I've installed Node.js for Windows and I'm trying to create a new React project via npm. Upon typing 'npx create-react-app projectName', I receive the following error:
ENOENT: no such file or directory, lstat 'C:\Users\Username\AppData\Roaming\npm'
Does anyone know how to fix this error?
I got the exact same error with npx nuxi@latest init my-app and the solution was surprisingly simple. Just create that missing directory.
mkdir "%AppData%\npm"
I got the exact same error in my Next.js project. The following command worked:
npm install npm -g
Later on I got a similar error in my project so I re-built the project:
npm run build
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