Here, in this article, we will learn how to clear or remove the cache from npm from windows, Linux, and mac.
npm (node package manager) is used when we need to install node packages to set up the development environment for a project locally in our system.
While working on a web project we do need to install lots of node packages using
npm install <package name> command. As we install a lot of packages to work on different projects, it piles up a lot of cache in our file system which needs to be cleared as it may hamper our development with lots of node errors.
By default, the cache is stored in the
%AppData%/npm-cache directory in windows and in Linux and, mac the cache is stored in
To clear cache in npm, we need to run
npm cache clean command in our terminal.
However, sometimes just the npm cache clean command doesn't work, so the better way is to run:
npm cache clean --force OR npm cache clean -f
The clean command will remove all the data present in the cache folder.
To verify if all the cache is cleared and removed from your file system, you can run this command in your terminal.
npm cache verify
In this tutorial we will learn how to make list of objects for netlify cms using list widget and object widget
learn how to fix npm ERR cb() never called error in nodejs easily. This methods will solve the error from node and npm easily.