问题是什么;节点";正在工作,但是;“诺德蒙”;在node.js中的64位windows 7上不工作吗?

问题是什么;节点";正在工作,但是;“诺德蒙”;在node.js中的64位windows 7上不工作吗?,node.js,Node.js,我是node.js的新手node工作正常,但当我安装nodemon软件包时,它给出了一个错误:在nodemon killing node中异常,即使是全局安装的 22 Jun 13:07:29 - [nodemon] v1.3.7 22 Jun 13:07:29 - [nodemon] to restart at any time, enter `rs` 22 Jun 13:07:29 - [nodemon] watching: *.* 22 Jun 13:07:29 - [nodemo

我是node.js的新手
node
工作正常,但当我安装
nodemon
软件包时,它给出了一个错误:
在nodemon killing node中异常,即使是全局安装的

 22 Jun 13:07:29 - [nodemon] v1.3.7
 22 Jun 13:07:29 - [nodemon] to restart at any time, enter `rs`
 22 Jun 13:07:29 - [nodemon] watching: *.*
 22 Jun 13:07:29 - [nodemon] starting `node server.js`
 exception in nodemon killing node  
 Error: spawn cmd ENOENT
 at exports._errnoException (util.js:746:11)
 at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
 at child_process.js:1144:20
 at process._tickCallback (node.js:355:11)

 ---------------------------------------------------------- 
 If appropriate, please file an error with the output from:
 $ node                     
 C:\Users\username\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.
 js server.js --dump
 At http://github.com/remy/nodemon/issues/new
可能的解决办法

1。权限

您的文件权限可能有问题。在git bash中或从windows中执行,以授予项目文件夹的完全权限

$ chmod -R 777 [folder] 
2。环境变量

路径中缺少“C:\Windows\System32\”

3。重新安装

使用npm完全卸下nodemon,然后尝试重新安装

npm uninstall -g nodemon
4。更新nodejs

如果您有旧版本的nodejs,请尝试更新它。我更喜欢完全删除nodejs并重新安装


注意:您的问题可能不够丰富,无法给出正确答案。如果这两个解决方案不起作用,请提供有关该问题的更多信息。

帮助spawn找到nodemon.cmd,如下所示:

var nodemonCmd = (process.platform == 'win32') ? 'node_modules\\.bin\\nodemon.cmd' : 'nodemon'
myApp = spawn(nodemonCmd, ['build/server.bundle']);

希望它能工作:)

在无意中清除我的Windows路径变量后,System32路径丢失。添加后,spawn cmd错误消失:)