程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了使用 npm start 启动我的反应项目会出现错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决使用 npm start 启动我的反应项目会出现错误?

开发过程中遇到使用 npm start 启动我的反应项目会出现错误的问题如何解决?下面主要结合日常开发的经验,给出你关于使用 npm start 启动我的反应项目会出现错误的解决方法建议,希望对你解决使用 npm start 启动我的反应项目会出现错误有所启发或帮助;

能够执行 npm install 但每次执行 npm start 命令时都会显示此错误。

是否缺少节点模块或什么?

已经尝试删除节点模块、package.lock 文件,尝试清除缓存但没有任何效果。

      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.Js:269:19)
    at onErrorNT (internal/child_process.Js:465:16)
    at processticksAndRejections (internal/process/task_queues.Js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.Js:275:12)
    at onErrorNT (internal/child_process.Js:465:16)
    at processticksAndRejections (internal/process/task_queues.Js:80:21) {
  errno: -4058,code: 'ENOENT',syscall: 'spawn cmd',path: 'cmd',spawnargs: [ '/c','start','""','/b','http://localhost:3000/' ]
}
npm ERR! code EliFECYCLE
npm ERR! errno 1
npm ERR! spark-react@1.0.0 watch:Js: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spark-react@1.0.0 watch:Js 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\Cedz ThinkPad 1\ApPDAta\roaR_675_11845@ing\npm-cache\_logs\2021-03-14T09_27_08_677Z-deBUG.log
events.Js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn taskkill ENOENT
    at notFoundError (C:\Users\Cedz ThinkPad 1\documents\FrontEnd\node_modules\npm-run-all\node_modules\cross-spawn\lib\enoent.Js:6:26)
    at verifyENOENT (C:\Users\Cedz ThinkPad 1\documents\FrontEnd\node_modules\npm-run-all\node_modules\cross-spawn\lib\enoent.Js:40:16)
    at ChildProcess.cp.emit (C:\Users\Cedz ThinkPad 1\documents\FrontEnd\node_modules\npm-run-all\node_modules\cross-spawn\lib\enoent.Js:27:25)
    at Process.ChildProcess._handle.onexit (internal/child_process.Js:277:12)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess.cp.emit (C:\Users\Cedz ThinkPad 1\documents\FrontEnd\node_modules\npm-run-all\node_modules\cross-spawn\lib\enoent.Js:30:37)
    at Process.ChildProcess._handle.onexit (internal/child_process.Js:277:12) {
  code: 'ENOENT',errno: 'ENOENT',syscall: 'spawn taskkill',path: 'taskkill',spawnargs: [ '/F','/T','/PID',35492 ]
}
npm ERR! code EliFECYCLE
npm ERR! errno 1
npm ERR! spark-react@1.0.0 start: `npm-run-all -p build:CSS watch:*`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spark-react@1.0.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\Cedz ThinkPad 1\ApPDAta\roaR_675_11845@ing\npm-cache\_logs\2021-03-14T09_27_08_781Z-deBUG.log
r.com/l2Q0m.png```

解决方法

好的,检查您的节点版本,如果它是最新的,请尝试安装节点版本 10 或不是最新的版本。它对我有用,我希望它会有所帮助

大佬总结

以上是大佬教程为你收集整理的使用 npm start 启动我的反应项目会出现错误全部内容,希望文章能够帮你解决使用 npm start 启动我的反应项目会出现错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。