I installed node js on windows 7 from https://nodejs.org/en/download/. When I run node -v out put is v8.9.4 But when I check npm -v out put is
The system cannot find the path specified.
5.6.0
In path variable entry is as
C:\Users\<username>\AppData\Roaming\npm
blank npm folder is present on above path
I added entry in path variable as it is recommended in some answer
C:\Program Files\nodejs
but still getting same error. I tried solutions I found online like above path entry, re installation, global installation of npm but still same error
I found a solution in this article: https://www.thetopsites.net/article/53531888.shtml "I needed to move my node paths further up the list. Windows must have been looking for NPM in the wrong path variable. I moved my node path to the top of the system path variables and now NPM works." It helped me after a day of struggle.
More details for the solution provided by @Thomas.K: Open Windows Settings and search for 'environ' like here:

Make sure to choose the one for "system environment", and in the dialog which appears press this button:

You will get this dialog

There are two PATH declarations, at top and bottom. You will have to remove the npm entry off the upper list, and paste it into the top of the lower list. This should solve the problem of "The system cannot find the path specified".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With