npm -v returns error message "perfix -g is not recognized as an internal or external command"


(Benoitcornette) #1

Hi,

I’ve installed Node and NPM by installing the MSI installer on https://nodejs.org/en/download/. No issues here but when I run “npm -v” in CMD I get the error message ‘CALL “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” prefix -g’ is not recognized as an internal or external command,
operable program or batch file. Node version is 10.15.0, NPM version is 6.4.1.

I’ve added a screenshot of my environment variables (system variables), perhaps this can help.
My user variable for NPM is C:\Users\bcorn\AppData\Roaming\npm.

Kind regards,

Benoit


(Lars Willighagen) #2

Does nodejs itself own work?


(Benoitcornette) #3

Yes, when I’m running “node-v” in CMD everything works fine, no error messages are fired.


(Lars Willighagen) #4

This seems related:


(system) closed #5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.