javascript - 当我想创建我的反应应用程序时出现 npm 错误
问题描述
我希望在创建我的反应应用程序期间得到您的帮助我在这里收到一条错误消息:
Microsoft Windows [版本 10.0.17763.1098] (c) 2018 Microsoft Corporation。Tous droits réservés。
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
欢迎对此问题的解释,谢谢
解决方案
推荐阅读
- python - TypeError: 'Response' 对象对于 BytesIO() 流是不可迭代的
- c# - SQL 在第二台计算机上加载结果的时间更长一些
- office-js - Word javascript api - 获取每页的最后一段
- python - Django查询设置复杂顺序-联合销毁顺序
- java - 如何使用 scrypt 使用密码加密私钥
- c++ - 检查 C++ 中 CAPSLOCK 是否打开/关闭
- java - 活动意图子不向父返回数据,不显示吐司
- ansible - Ansible:通过迭代注册并展示结果
- android - 应用程序在后台时无法导航
- oauth-2.0 - 在授权码授予流程的情况下,OAuth 访问令牌存储在浏览器中的什么位置