我正在学习ReactJs课程,在Windows 7中使用命令创建FirstReactApp。
npm install -g create-react-app
npm create-react-app
这两个代码都可以正常工作,但当我尝试使用npm start启动服务器时,遇到了一个名为ELiFECYLE的错误。以下是我收到的错误信息:
C:\my-react-app>npm start
> my-react-app@0.1.0 start C:\my-react-app
> react-scripts start
Starting the development server...
events.js:174
throw er; // Unhandled 'error' event
^enter code here
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-react-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-react-app@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: