AHa
AHa

Reputation: 73

'npm' 'node' is not recognized as internal or external command, operable program or batch file for Windows

Installing nvm nodejs on Windows. nvm works fine but npm or node returns me "is not recognized as an internal or external command, operable program or batch file."

I have included the paths to PATH: %JAVA_HOME%\bin;%MONGODB_HOME%\bin;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;%NVM_HOME%;%NVM_SYMLINK%;

where NVM_SYMLINK refers to C:\Program Files\nodejs

Upvotes: 0

Views: 1547

Answers (1)

AHa
AHa

Reputation: 73

Apparently Graalvm Java comes with nodejs (C:\Program Files\graalvm-ce-java11-20.2.0\bin\ with npm.cmd node.cmd npx.cmd) and they do not work. If %JAVA_HOME%\bin in PATH comes before nodejs config (%NVM_SYMLINK%;) the npm, node, npx from Java are executed instead.

it should be:

%NVM_SYMLINK%;%JAVA_HOME%\bin;%MONGODB_HOME%\bin;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;%NVM_HOME%;

Upvotes: 1

Related Questions