Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
278 views
in Technique[技术] by (71.8m points)

javascript - I keep getting this error after typing npm start into the terminal

I keep getting these errors. Recently developed a simple web app and posted on my repository and kept getting these errors thereafter.

npm ERR! code ELIFECYCLE – David 1 hour ago   
npm ERR! syscall spawn C:Windowssystem32cmd.exe;C:Users'username'AppDataLocalGitHubPortableGit_'numbersandletters'cmdgit.exe; C:Program Files
odejs   
npm ERR! file C:Windowssystem32cmd.exe;C:Users'username'AppDataLocalGitHubPortableGit_'numbersandletters'cmdgit.exe; C:Program Files
odejs   
npm ERR! path C:Windowssystem32cmd.exe;C:Users'username'AppDataLocalGitHubPortableGit_'numbersandletters'cmdgit.exe; C:Program Files
odejs   
npm ERR! errno -4058 npm ERR! [email protected] start: react-scripts start 
pm ERR! spawn C:Windowssystem32cmd.exe;C:Users'username'AppDataLocalGitHubPortableGit_'numbersandletters'cmdgit.exe; C:Program Files
odejs ENOENT npm ERR! npm ERR! Failed at the [email protected] 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:UsershpAppDataRoaming
pm-cache_logs2021-01-09T03_19_55_548Z-debug.log C:UsershpDesktopDavid
obofriends>

i kept getting erros even after deleting the node modules and package.json, i uninstalled node and installed again, ran npm innit to get my package.json and i got this error

'CALL "C:Program Files odejs ode.exe" "C:Program Files odejs ode_modules pmin pm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

ENOENT means no such file or directory, meaning something being referenced by some process doesn't exist where the process thought it did, such as the node executable, cmd.exe, or the react-scripts executable in node_modules. In this case it seems to be a Windows-specific issue. Adding cmd.exe to your path may fix things. See this question for more.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...