From the course: Learning npm: A Package Manager
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Working with your npm cache
From the course: Learning npm: A Package Manager
Working with your npm cache
- [Instructor] Npm keeps a cache of your installed modules so that it doesn't have to get them every time, but that sometimes can lead to unexpected results. And worse, turn app that doesn't work properly. And the symptoms will be somewhat vague at first, but in most cases, when you try to install a module that should be working properly and it doesn't or a version of a module that doesn't work, just try clearing up your cache. Npm's official docs say sometimes npm's cache gets confused. And that is sometimes a reality that will lead to hours of frustration. Clearing your npm cache should always be part of your troubleshooting steps when working with modules and really not understanding what's happening. Since npm5, the cache self-heals. But again, we're talking about a process that is not foolproof and you might need to force it. So let me demonstrate a few commands worth knowing to manage your cache. So now, I'm back on…