npm-cli.js not found when running npm error and solution

In this article, we will see, How to solve “npm-cli.js not found when running npm” error while running the npm command on the command prompt in Windows.

Problem

While running npm encountered an error :

npm-cli.js not found when running npm

Solutions

Solution 1

This might happen if you have removed the npm-cli module from the nodeJS installation maybe by mistake or while performing some other installation or made some changes in the path of the environment variable of your system (windows or Linux).

Solution 2

One of the Solutions is to repair the NodeJS installation in your machine and this issue should get resolved.

Go to Control Panel\All Control Panel Items\Programs and Features and find NodeJS. Choose the option repair to repair it.

Did these options work for you? Feel free to share your viewpoints on this topic in the comments section below 🙂

Spread the word!
0Shares

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “npm-cli.js not found when running npm error and solution”