Whenever I type this command:
npx create-react-app project-app
It doesn’t work, and outputs this error message.
I tried reinstalling nodejs
, creating the react app in another folder, checking the latest version of create-react-app
. All of which output the same error message.
2
Answers
This error usually means that npm is not able to find the specified file. Check the pathname and make sure that it is in the correct location. You can also try running
npm cache clean --force
to clear the npm cache. For more information, see this npm page.use
npm install --verbose
verbose mode ornpm install --loglevel=verbose
debug mode to see where the npm is going to find the file path and accordingly set the path.