You need to add C:\Program Files\nodejs(nodejs installation directory it may differ) your PATH environment variable. To do this follow these steps:

Use the global Search Charm to search “Environment Variables”

Click “Edit system environment variables”

Click “Environment Variables” in the dialog.

In the “System Variables” box, search for Path and edit it to include C:\Program Files\nodejs. Make sure it is separated from any other paths by a ;.

You will have to restart any currently-opened command prompts before it will take effect.

It holds good for mac, and linux, Set PATH command needs to be executed.

☝☝Question: Do I need to install npm? where I can find npm?

No, You don’t need to install npm separately. It will be installed during the installation of NodeJS. You can verify it by running npm -v in command prompt. If it fails then you need to check the PATH Environment variable.