create-react-app eintegrity错误窗口

时间:2017-09-10 06:42:56

标签: reactjs npm

当我开始在Windows 10中创建反应应用程序时,我收到了这些错误。请帮我解决这个问题。

PS F:\> npm install -g create-react-app
C:\Users\Harshit Singh\AppData\Roaming\npm\create-react-app -> C:\Users\Harshit Singh\AppData\Roaming\npm\node_modules\create-react-app\ind
ex.js
+ create-react-app@1.4.0
updated 1 package in 24.169s
PS F:\> create-react-app my-app

Creating a new React app in F:\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! code EINTEGRITY
npm ERR! sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= integrity checksum failed when using sha1: wanted sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= but got sha1
-reRBygSiSrbV6gYVeXXD3kFgUvo=. (5518 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Harshit Singh\AppData\Roaming\npm-cache\_logs\2017-09-10T06_11_12_677Z-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 my-app / from F:\
Done.

2 个答案:

答案 0 :(得分:0)

检查this github issue是否有可能的解决方案。

  

在用户%username%\ AppData \ Roaming中删除npm和npm-cache文件夹   (Windows 7)并运行npm install为我修复了

答案 1 :(得分:0)

尝试:npm cache verify

或更新npm:npm i -g npm