Node command not found after installing nodejs

I simply wanted to upgrade my Node installation from v8 to v10. After installing nodeJs, no node command works from the command line. However, npm commands like "npm install" work. Yet when i do "npm start" for e.g. a react app, or simply when i am typing "npm -v", it says (And I have to roughly translate here, because unfortunately my output is german):

The command "node" is either written incorrectly or could not be found.

I am on Win7 x64 and have installed NodeJS v10.15.0-x64 with the .msi installer.

After the installation, I have checked that the installation dir is added to the Path environment variable. I have checked the path for spaces after the semicolon, and tried to put parentheses around the path. I have checked in the registry that the path is set to expand. Reverting, Re-installing etc. also does not help.

Screenshot showing the behavior in the console

Still, it is most likely some problem with cmd not expanding the path because it works when I navigate to the nodejs directory and then type in the commands. However, I have definitely double and triple checked that the string in the path is correct.

1 Answer

Through trial and error I figured it out:

The path to node and npm need to be at the beginning of the Path variable, i.e. it has to start with path/to/nodejs/ and /path/to/npm

I have unfortunately no idea why that is the case but doing that definitely fixed it for me.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like