简体   繁体   中英

I'm not able to create react app by “create-react-app”

Getting this on console

> core-js@2.6.11 postinstall G:\mernbootcamp\testfront\my-app\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting my-app/ from G:\mernbootcamp\testfront
Done.

the issue is: now we cannot create react app globally. It could be possible that you have some old version installed.

Unstall first

npm uninstall -g create-react-app

Then navigate to your folder where you want to create the react app. and write this command:

npx create-react-app my-app

I have got the solution to my question, if you are facing same issue, which i faced, try creating react app after turning off your virus protection, i tried this and it worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM