NPM: npm-cli.js not found when running npm
You may also have this problem if in your path you have C:\Program Files\nodejs
and C:\Program Files\nodejs\node_modules\npm\bin
. Remove the latter from the path
It turns out the issue is due to the wrong path of node in system variable. The path is currently pointing to
(I really don't know when I modified it)
C:\Program Files\nodejs\node_modules\npm\bin
so I change to
C:\Program Files\nodejs
and it works like a charm.
You need to run this in the command line.
SET PATH=C:\Program Files\Nodejs;%PATH%
I just repaired my NodeJS installation and it worked for me!
Go to Control Panel\All Control Panel Items\Programs and Features
--> find NodeJS
and choose option repair to repair it. Hope this helps.