首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >在终端中键入npm start后,我一直收到此错误

在终端中键入npm start后,我一直收到此错误
EN

Stack Overflow用户
提问于 2021-01-09 01:57:36
回答 1查看 450关注 0票数 0

我一直收到这些错误。最近开发了一个简单的web应用程序,并将其发布到我的存储库中,此后不断收到这些错误。

代码语言:javascript
代码运行次数:0
运行
复制
npm ERR! code ELIFECYCLE – David 1 hour ago   
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\Users'username'\AppData\Local\GitHub\PortableGit_'numbersandletters'\cmd\git.exe; C:\Program Files\nodejs   
npm ERR! file C:\Windows\system32\cmd.exe;C:\Users'username'\AppData\Local\GitHub\PortableGit_'numbersandletters'\cmd\git.exe; C:\Program Files\nodejs   
npm ERR! path C:\Windows\system32\cmd.exe;C:\Users'username'\AppData\Local\GitHub\PortableGit_'numbersandletters'\cmd\git.exe; C:\Program Files\nodejs   
npm ERR! errno -4058 npm ERR! robofriends@0.1.0 start: react-scripts start 
pm ERR! spawn C:\Windows\system32\cmd.exe;C:\Users'username'\AppData\Local\GitHub\PortableGit_'numbersandletters'\cmd\git.exe; C:\Program Files\nodejs ENOENT npm ERR! npm ERR! Failed at the robofriends@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\hp\AppData\Roaming\npm-cache_logs\2021-01-09T03_19_55_548Z-debug.log C:\Users\hp\Desktop\David\robofriends>

即使在删除了节点模块和package.json之后,我仍然得到错误,我卸载了节点并再次安装,运行npm innit来获取我的package.json,我得到了这个错误

‘'CALL "C:\Program Files\nodejs\node.exe“"C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js”前缀-g’未被识别为内部或外部命令、可操作程序或批处理文件。

EN

回答 1

Stack Overflow用户

发布于 2021-01-09 04:27:26

ENOENT的意思是no such file or directory,意思是某些进程所引用的东西并不存在,比如节点可执行文件、cmd.exe或node_modules中的反应脚本可执行文件。在这种情况下,这似乎是特定于Windows的问题。将cmd.exe添加到您的路径中可能会修复一些问题。See this question for more

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65634064

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档