Quantcast
Channel: User Simon_Weaver - Stack Overflow
Viewing all articles
Browse latest Browse all 116

Answer by Simon_Weaver for Please run `npm cache clean`

$
0
0

A 'non corrupted global cache' is not the same as a 'non broken node_modules' for a particular project.

Just got this when trying to run a simple Angular CLI command (Windows):

An unhandled exception occurred: Cannot find module './formats/index'

I verified the global cache was ok with:

npm cache verify

Then I deleted the contents of nodule_modules and ran npm install and everything worked again.

Not sure if there's an equivalent to cache verify for a project's node_modules, but I've had to purge it many many times. But it's good to verify the cache is sound first.


Viewing all articles
Browse latest Browse all 116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>