Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm package seems to be corrupted

I am getting these warnings and then errors at the end. What is the fix?

npm WARN deprecated [email protected]: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN tarball tarball data for @angular/compiler@^8.0.0 (sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for @angular/core@^8.0.0 (sha512-zeePkigi+hPh3rN7yoNENG/YUBUsIvUXdxx+AZq+QPaFeKEA2FBSrKn36ojHFrdJUjKzl0lPMEiGC2b6a6bo6g==) seems to be corrupted. Trying one more time.
like image 898
Muzaffar Mahmood Avatar asked Nov 22 '19 07:11

Muzaffar Mahmood


People also ask

Is it safe to clean npm cache?

clean: Delete all data out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues. verify: Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.

Do npm clean install?

It does a clean install: if the node_modules folder exists, npm deletes it and installs a fresh one. It checks for consistency: if package-lock. json doesn't exist or if it doesn't match the contents of package.


1 Answers

Try removing package-lock.json and then npm install. This worked for me:

cd <your-project-directory>
rm package-lock.json
npm install 
like image 170
Parth Shah Avatar answered Oct 23 '22 14:10

Parth Shah