npm ERR! As of npm@5, 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
Asked
Active
Viewed 4.6k times
10

Community
- 1
- 1

Chanaka Amarasinghe
- 3,489
- 11
- 26
- 38
3 Answers
23
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 run.

A-Sharabiani
- 17,750
- 17
- 113
- 128
8
Try deleting your node_modules folder inside your project, and then run npm install again.

Stephen R. Smith
- 3,310
- 1
- 25
- 41
-
2I was having problem with `npm cache clean` deleting `node_modules` and running with `--force` (as suggested by @A-Sharabiani) works for me. – smtaha512 Mar 10 '19 at 14:44
-
I thinks It is not correct way for resolve this problem. I thinks correct way it is use this command "npm cache clean --force" – Ramil Aliyev 007 Jul 16 '20 at 12:22
-
npm cache clean --force didn't work for me. Removing node_modules folder worked for me – Hadayat Niazi Jun 14 '22 at 11:17
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.

Deva
- 1,851
- 21
- 22