I'm not able to create react app by create-react-app and it gives me an error
Try using npx create-react-app, be sure to have npm >= 5.2
First install create-react-app globally
npm install create-react-app -g
Then run the following command
create-react-app app-name
Related
I am trying to install a react-native app using React-Native docs but it is throwing me this error.
I have tried. npm init, npm uninstall -g react-native-cli, npm uninstall -g create-react-app
They have all failed.
Thank you in advance.
I got the solution.
Just delete npm_cache folder from the Local folder.
Try to follow the route below.
C:\Users\your-name\AppData\Local\npm-cache
That worked for me.
this is the error i am facing while creating react app.
I had tried below solution but it doesnot work for me
updated my npm using below command
npm i -g npm#latest
npm cache clear --force
yarn cache clear
npx create-react-app myapp --use-npm
I also check .npmrc folder in C:user>me> but still it not working
Node version
v16.15.0
Npm version
8.13.0
you don't need to use --use-npm
Simply use
npx create-react-app app-name
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?
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 use
npm create-react-app
If you add create-react-app to your package json with
npm install create-react-app
you can then use npx to run the command.
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.
node --version => 14.5.0
npm --version => 6.14.6
create-react-app --version => 3.4.1
yarn --version => 1.22.4
I tried all ways to solve this problem but all in vain. I reinstall node update every thing also consult stackoverflow but i am unable to solve this....please help me....
Welcome to StackOverflow.
If you, by any luck visited the create-react-app GitHub repository.
You could have found that the create-react-app as a package is not deprecated, and thus you have to use the npx thing over here.
create-react-app officially asks you to uninstall create-react-app and use the npx script.
First, uninstall create-react-app
npm uninstall -g create-react-app
And then simple run the following command to create a new react-app
npx create-react-app my-app
Then you can change directory to my-app and run it using npm.
cd my-app
npm start
I'm trying to create a React application via npm create-react-app my app and I get this error:
I've installed npm install command. What is the problem with what I'm doing?
https://github.com/facebook/create-react-app
npx create-react-app my-app
cd my-app
npm start
You can't have spaces in the app name