javascript - nodemon 和 nodeclipse 不会在文件更改时自动重新启动

标签 javascript node.js nodeclipse nodemon

我成功地使用nodemon设置了nodeclipse,现在我可以使用监视器(nodemon)启动我的server.js脚本,但发生了一些奇怪的事情:

  1. 文件更改时(即使在 server.js 上)nodemon 不会重新启动
  2. 在 nodeclipse 控制台中,我看不到正常的 nodemon 输出,例如:
1 Aug 15:20:05 - [nodemon] v1.2.1
1 Aug 15:20:05 - [nodemon] to restart at any time, enter `rs`
1 Aug 15:20:05 - [nodemon] watching: *.*
1 Aug 15:20:05 - [nodemon] starting `node server.js`

PS:我已经设置了 nodemon.js 的监视器路径,该路径是使用 -g 参数安装的 我也无法为“带监视器的 Node ”创建任何类型的运行配置

如果没有任何其他选项,即使没有nodemon,是否有任何方法可以在 nodeclipse 中自动重新启动服务器...

最佳答案

过了一段时间,我最终创建了一个 Node 应用程序运行配置,并简单地在参数选项卡中添加了 Node 参数 nodemon.js

就我而言:C:\Users\syd\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js

现在我能够获取控制台提要以及从 Eclipse 停止 Node 服务器并在文件更改时自动重新启动:)

关于javascript - nodemon 和 nodeclipse 不会在文件更改时自动重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25080384/

相关文章:

javascript - 无法推送列表数据

eclipse - 如何将 Github 存储库导入 Nodeclipse (Enide)?

eclipse - Node.js 到 Cloud Foundry 的应用

javascript - Nodejs 异步更新插入问题

java - eclipse : saved LaunchConfiguration overrides LaunchType

javascript - React 虚拟化 : Table rows get cut off when autoHeight is on

javascript - 如何在 JavaScript/jQuery 上合并音频和视频 blob?

javascript - 如何让 Typescript 编译器将编译后的 js 输出到不同的目录?

Node.js:使用参数进行 HTTP POST

Javascript 将函数的返回值转换为变量