我要创建我的React应用程序时出现npm错误

时间:2020-04-24 06:26:21

标签: javascript

我想在我创建React应用程序的过程中得到您的帮助,我在这里看到一条错误消息:

Microsoft Windows [版本10.0.17763.1098] (c)2018年微软公司。 Tous驾驶了servservs。

C:\Users\Godson>npm --v
6.14.4

C:\Users\Godson>npm install create-react-app -g
C:\Users\Godson\AppData\Roaming\npm\create-react-app -> C:\Users\Godson\AppData\Roaming\npm\node_modules\create-react-app\index.js
+ create-react-app@3.4.1
added 10 packages from 6 contributors, removed 2 packages and updated 34 packages in 56.528s

C:\Users\Godson>npm install --global npm@latest
C:\Users\Godson\AppData\Roaming\npm\npm -> C:\Users\Godson\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
C:\Users\Godson\AppData\Roaming\npm\npx -> C:\Users\Godson\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
+ npm@6.14.4
added 435 packages from 869 contributors in 93.752s

C:\Users\Godson>npm install create-react-app -g
C:\Users\Godson\AppData\Roaming\npm\create-react-app -> C:\Users\Godson\AppData\Roaming\npm\node_modules\create-react-app\index.js
+ create-react-app@3.4.1
updated 1 package in 20.534s

C:\Users\Godson>create-react-app jeux

Creating a new React app in C:\Users\Godson\jeux.

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 '...w3bl8EeB3TQE8OQWwKsHA'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Godson\AppData\Roaming\npm-cache\_logs\2020-04-18T09_01_02_112Z-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 jeux/ from C:\Users\Godson
Done.

C:\Users\Godson>npx create-react-app jeux

Creating a new React app in C:\Users\Godson\jeux.

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 '...w3bl8EeB3TQE8OQWwKsHA'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Godson\AppData\Roaming\npm-cache\_logs\2020-04-18T09_14_27_921Z-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 jeux/ from C:\Users\Godson
Done.

C:\Users\Godson>

我尝试了npm cache clean --force,但仍然是同样的问题 这是此命令后出现的消息

npm WARN using --force I sure hope you know what you are doing

欢迎对此问题进行解释,谢谢

0 个答案:

没有答案