简体   繁体   中英

React Dout in creation of the project?

I'm trying to create the react projet. During the creation I'm getting these errors. Please help me!

Creating a new React app in H:\React Projects\react-js.

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

npm ERR! Unexpected end of JSON input while parsing near '...\n"}},"0.2.3-next.9b4'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Siva Rami Reddy\AppData\Roaming\npm-cache_logs\2020-09-26T05_06_09_438Z-debug.log

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

Deleting generated file... package.json Deleting react-js/ from H:\React Projects Done.

Try this command

 npm cache clean --force

then create new react project

npx create-react-app yourapp

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