When I run npx create-react-app my-app, I get:
npm ERR! code ENOENT
npm ERR! syscall spawn npm
npm ERR! path D:\ReactDemo
npm ERR! errno -4058
npm ERR! enoent spawn npm ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\Mi PC\AppData\Local\npm-cache\_logs\2024-03-22T11_27_00_455Z-debug-0.log
I tried to:
Reinstall NodeJS
Run:
npm uninstall -g create-react-app && npm i -g npm@latest && npm cache clean -fClear the system temp folder and set the environmental vars.
Clear the npm cache folder etc.
Update NPM:
Clear the cache:
Reinstall only globally:
Restart your computer and start a CMD as administrator. Then you can try:
Or:
Or: