I'm starting learning nodejs with express, when I try to run the command "npx create-react-app my-app" I get several errors that npm was not found
npm ERR! enoent This is related to npm not being able to find a file.
The logs says:
verbose stack Error: ENOENT: no such file or directory, lstat 'C:\Users\irami\AppData\Roaming\npm'
However, if I run the following
npm config get prefix
I get
C:\Users{myname}\AppData\Roaming\npm
Not quite understanding what is I'm doing wrong, or how to fix it. Any help?
This actually worked for me:
npm install -g npm@latest
npm cache clean -f
npm rm -rf node_modules
rm package-lock.json
npm install
After all those steps, I was able to see npm under AppData\Roaming.
Thanks for your answers :)
npm directory in AppData directory.Then re-run npx create-react-app my-app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With