React.js /`react-scripts在myapp@0.1.0启动脚本处启动/失败

时间:2020-06-22 16:55:17

标签: node.js reactjs npm

C:\Users\admin\Desktop\firstreact\myapp>npm start

> myapp@0.1.0 start C:\Users\admin\Desktop\firstreact\myapp
> react-scripts start

i 「wds」: Project is running at http://192.168.1.5/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\admin\Desktop\firstreact\myapp\public
i 「wds」: 404s will fallback to /
Starting the development server...

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

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn cmd',
  path: 'cmd',
  spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myapp@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\admin\AppData\Roaming\npm-cache\_logs\2020-06-22T16_36_59_191Z-debug.log

C:\Users\admin\Desktop\firstreact\myapp>

尝试安装react.js,但是每次我输入npm start时,都会在cmd中显示此错误! 我已经下载了本教程中介绍的所有重要软件包,但仍然无法使用 此外,它还显示run `npm fund` for detailsnpm audit fix提出了解决方法的建议。

0 个答案:

没有答案