I'm trying to create-react-app but it's showing error
I've tried
- npm cache clean --force
- npx create-react-app .
Also used this but same issue occurs
- npm install -g create-react-app
can anyone suggest how to fix this?
I'm trying to create-react-app but it's showing error
I've tried
Also used this but same issue occurs
can anyone suggest how to fix this?
Check if your create react app version is compatible with your machine's node version. Upgrade or downgrade accordingly to match the two. This fixed the issue at my machine.
I got this mistake once and the reason was because I ran the "npm " commands without haven't "cd" into my react project.
i had the folder structure like:
I was running "npm start" while been in "Project" directory. you have to "cd" into your react-app (..in this case 'react-project') before running any npm commands.
npx is used for the libraries in node_modules in your project
Since you used
-g
(meaning global) to install create react app you should useIf you add
create-react-app
to your package json withyou can then use
npx
to run the command.