Every time I run npx create-react-app my-app
I get this error:
npm ERR! code ENOENT
npm ERR! syscall mkdir
npm ERR! path foo:\bar\node_modules\react
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, mkdir 'foo:\bar\node_modules\react'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
I've been looking for a fix all day but cant seem to get past it.
CodePudding user response:
You can try
npm cache clean --force
npm i create-react-app
You can delete both node_modules and package-lock.json
run npm i web-vitals --save-dev
run npm install
and then you can use npm run build and npm start again.
If these don't work, you can try
yarn cache clean
yarn install
and then npx create-react-app your-app.
Hope it helps!
CodePudding user response:
This might not solve anyone elses issue but it might be worth a try if you absolutely cant find your answer anywhere:
oddly enough even though I had access to all my drives, after I physically disconnected and re-connected them all I no longer had the error.