我想我做了什么破坏了 Node 。我试过改变路径,但我真的不知道我在做什么,也不想让问题变得更糟。尝试卸载并重新安装 Node 都无济于事。任何帮助或想法都会很棒。
Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www start`
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
最佳答案
发现我设置了两次端口,一次在 app.js 中,一次在 .bin/www 中,所以在注释掉其中一个后,它现在部署成功了!所以我只是一个瓜。希望这对其他人有帮助!
关于node.js - 事件.js :160 throw er;//Unhandled 'error' event ^,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41262986/