Reputation: 1
Have installed Node.js and VS Code too. While running npx create-react-app my-app
in the terminal there is the error coming:
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\AMAN\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\AMAN\AppData\Roaming\npm'
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\AMAN\AppData\Local\npm-cache\_logs\2024-04-06T15_41_19_323Z-debug-0.log
I don't know what to do. I tried npm cache clean --force
but after that, this came npm WARN using --force Recommended protections disabled
. Also tried package-lock.json
but no use.
Upvotes: 0
Views: 80
Reputation: 11
Go to this location C:\Users\UserName\AppData\Roaming\
and create a folder with the exact name npm. After that, restart Vs Code and retry. The error will be solved.
If you don't find the AppData
folder just go to the folder options and tick the option "Show hidden folders".
Upvotes: 1