'npm cache clean' not working angular VS Code as IDE

npm ERR! As of [email protected], the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be
valid. If you want to make sure everything is consistent, use ‘npm cache verify’ instead.
npm ERR!
npm ERR! If you’re sure you want to delete the entire cache, rerun this command with –force.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\janak\AppData\Roaming\npm-cache_logs\2017-08-11T04_38_31_995Z-debug.log

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

Run the command with --force:

npm cache clean --force

Based on npm documentation:

it should never be necessary to clear the cache for any reason other
than reclaiming disk space, thus why clean now requires –force to

Solution 2

Try deleting your node_modules folder inside your project, and then run npm install again.

Solution 3

Run the same command and just add --force or -f with it.

npm cache clean --force or npm cache clean -f

This error shows because you are accessing project on client terminal. please open terminal in administration mode and hit npm cache clean command.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply