I use nodemon /questions/tagged/nodemon作为节点中的开发依赖项。突然,CLI 中显示:
[nodemon] 由于更改而重新启动...
当我更改代码时。然后我已经全局安装了nodemon,但它仍然无法工作。它不适用于任何项目——不是单个项目。
有什么帮助吗?我附上了 CLI 的屏幕截图:
这可能是因为启动更新了服务器正在监视的文件,因此在无限循环中触发了重新启动事件。
Nodemon 支持--watch
and --ignore
命令。尝试使用它们来只观看一组特定的文件。例子:
# Only watch the "server" directory
nodemon --watch server server/main.js
# Watch both the "server" and "client" directory
nodemon --watch server --watch client server/main.js
# Watch the "server" directory, but ignore "server/logs"
nodemon --watch server --ignore server/logs server/main.js
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)