我无法在Windows 10上启动nodemon

时间:2017-10-20 10:11:42

标签: javascript json node.js npm nodemon

我最近开始学习Node,我成功运行了我的第一个节点应用程序,但没有nodemon。我使用npm install -g nodemon全局安装了nodemon,并成功安装了.. 如果我然后运行nodemon index,我会看到以下错误 [nodemon] 1.12.1 [nodemon] to restart at any time, enter的RS [nodemon] watching: *.* [nodemon] starting ``node index index.js events.js:182 throw er; // Unhandled 'error' event       ^

`Error: spawn cmd ENOENT
at _errnoException (util.js:1019:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

` 请您的建议

2 个答案:

答案 0 :(得分:0)

检查您的PATH变量是否包含:... ORDER BY RAND(1) LIMIT @offset, 1; 。如果没有,请添加它。

答案 1 :(得分:0)

它的路径问题

1。C:\Windows\System32\添加到行尾的PATH环境变量

**`Verify the npm folder exists at the following location    C:\Users\My-UserName\AppData\Roaming\npm`** 

Try to run npm cache clean