NPM ERR! CODE EINTEGRITY when i run create react app

2.7k Views Asked by At

I tried starting a new react project and i kept getting this error

 npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/default-gateway: Integrity verification failed for sha512-XNq1bW+TSjcWkvLm57AQGDZuMWP+o91SzJFSO/wm6OJyCzHQBgEh6ltY91FHduphvXq1p6szX47GjsuhU2W05Q== (C:\Users\LENOVO\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\5c\da\b56d6f934a371692f2e6e7b01018366e3163fea3dd52cc91523bfc26e8e2720b31d0060121ea5b58f7514776ea61bd7ab5a7ab335f8ec68ecba15365b4e5)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\LENOVO\AppData\Roaming\npm-cache\_logs\2019-10-15T07_32_25_495Z-debug.log

Aborting installation.

i have tried updating NPM but it just does not seem to work!

2

There are 2 best solutions below

0
On BEST ANSWER

This worked for me:

npm cache verify

or you can try

npm cache clean --force

0
On

I had the same issue. It worked for me after removing the spaces in the directories name, e.g. C:\Users\LENOVO\React Projects\webapp becomes C:\Users\LENOVO\React_Projects\webapp