简体   繁体   中英

cannot create a new react project using create-react-app

I am trying to create a new react project with create-react-app but each time it fails because of this error.......

I am using npm version 6.3.0 and node version 10.8.0

I don't know what to do............

Creating a new React app in C:\\Users\\Demonblade\\Desktop\\test .

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts...

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Demonblade\AppData\Roaming\npm-cache\_logs\2018-08-09T15_27_48_357Z-debug.log

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

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting test / from C:\Users\Demonblade\Desktop
Done.

Use npx (it comes with npm 5.2+).

From the react docs :

You'll need to have Node >= 6 and npm >= 5.2 on your machine. To create a project, run:

npx create-react-app my-app
cd my-app
npm start

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