Reputation: 11
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:\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! [email protected] 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 [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:\Users\hp\AppData\Roaming\npm-cache_logs\2021-01-09T03_19_55_548Z-debug.log C:\Users\hp\Desktop\David\robofriends>
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\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.
Upvotes: 0
Views: 1694
Reputation: 7787
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.
Upvotes: 1