Installed node js getting "The syntax of the command is incoorect"

Viewed 34

I updated node.js yesterday on my computer and it appears to have installed fine. If I type -v I get the correct information.

node -v

I get the correct version number of v16.13.1

However when I try to type

npm -v

I get the three lines of

The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
The syntax of the command is incorrect. 
/F was unexpected at this time. 

System Info

Windows 10 Home 64-bit, OS build 19043.1348

1 Answers

You need to Add C:\Program Files\nodejs to your PATH environment variable.

1- Search in start menu for "Edit system environment variables"

2- Click "Environment Variables"

3- In the "System Variables" find path and click to edit

4- add nodejs path

5- add npm path %USERPROFILE%\AppData\Roaming\npm

6- close all command prompts and open it again.

Related