node.js - 事件.js :160 throw er;//Unhandled 'error' event ^

标签 node.js enoent

我想我做了什么破坏了 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/

相关文章:

javascript - 如何在没有任何缓冲区错误的情况下检索 JSON 键?

javascript - 缺少脚本 : build - firebase deploy

javascript - PhoneGap : Device Plugin Not Working

node.js - Node js ENOENT文件错误处理

node.js - Electron 应用程序 createWriteStream 抛出 ENOENT 错误

node.js - 错误 : ENOENT: no such file or directory, 取消链接

node.js - 在node.js中如何请求或访问集群中的特定worker(使用进程ID或worker编号)?

node.js - NodeJS 和 Socket.IO 用户认证

android - 无法使用 “adb reverse”连接到开发服务器:spawnSync adb ENOENT

javascript - 在Ubuntu 18.04上安装nodemon时出错