DEV Community

ucheuzor
ucheuzor

Posted on

How to fix npm or yarn installation error.

Have you ever tried installing an npm package and run into error? Or maybe you deleted your node modules and tried to reinstall using npm install and boom, there is an error. It can be frustrating, because you can't make progress.

There is an easy command to fix such errors. Once you install a dependency and there is an error, simply run your terminal npm cache clean __force. This will run through files and clean up and errors or logs that may be causing such errors. I feel it's a must have toolkit under any developers belt as errors do come up, regularly while we install or update dependencies.

Top comments (0)