React App使用NodeJS失败:错误:在Process.ChildProcess._handle.onexit上生成cmd ENOENT

时间:2019-05-10 10:38:20

标签: node.js reactjs exception npm

我正在尝试使用以下命令在Windows下使用NPM运行React App:

npm install -g create-react-app
create-react-app hello-world
cd hello-world/
npm start

但是我收到以下错误:

events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:249:19)
    at onErrorNT (internal/child_process.js:442:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
    at onErrorNT (internal/child_process.js:442:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-world@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-world@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\X220\AppData\Roaming\npm-cache\_logs\2019-05-10T10_32_09_262Z-debug.log

我试图替换节点版本,但没有帮助。

任何想法如何解决?

已更新: 节点版本:v12.2.0 NPM版本:6.9.0

0 个答案:

没有答案