John
John

Reputation: 2825

Using npm from the command line with Visual Studio 2015 Web Project

After installing Visual Studio 2015 I am able to use the new editor features to add dependencies to Node packages and restore etc from within a Web project as per this documentation: http://webtooling.visualstudio.com/package-managers/npm/

Presumably Visual Studio must install node/npm somewhere in order to support these features, however it does not seem to modify my PATH to make these tools available on the command line (or via Visual Studio 2015 Command Prompt).

If I want to perform some npm operations on my project from the command line can I do this without installing node/npm again (which might become out of sync with the version of npm/node that Visual Studio is using) or is there a way to access the node/npm installation Visual Studio is using from the command line?

Upvotes: 20

Views: 22734

Answers (1)

Michael Braude
Michael Braude

Reputation: 6973

VS2015 installs node using Joyent's installer. It depends on the system-wide install and it does not have it's own specific or local version.

If you're command line is unable to find node.exe, I would first check your path property in your environment variables and add it if it's missing (it should be C:\Program Files (x86)\nodejs). If you see node's install directory there but still can't access it from the command line, reboot. Sometimes Windows needs to restart before it uses the updated path variable.

Hope that helps.

Upvotes: 2

Related Questions