Richard
Richard

Reputation: 1106

Visual Studio Installer is not installing node.js

In Visual Studio Installer, I selected the Node.js development option. It runs successfully. But, if I try to run cmd node -v. It tells me node does not exist.

I tried a few other things including uninstalling and reinstalling the Node.js development option in VS Installer. Plus installing the latest version of node from the website.

However, when I try to run the pre-packed Angular solution that comes with VS 2017 I have issues. The solution will not even start.

The best I have been able to do is install Node 6.10.3. Once I do that, the web site comes up. But, I get a JavaScript error in the vendor.js file. I am able to continue but I get this error when I try navigate to another menu item. Plus the Hot Module Replacement does not seem to be working. (It does not automatically recompile my TypeScript file if I made a change).

I think the key is getting the Node.js development option installed correctly since I am able to run the pre-packed Angular solution on another PC and the Hot Module Replacement works fine.

Please let me know if anyone has any ideas on how to resolve.

Upvotes: 6

Views: 2380

Answers (1)

ryanwebjackson
ryanwebjackson

Reputation: 1046

I had a similar, if not the same, issue. Check the Visual Studio installation directory (2017 Professional in this case) for Node:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\NodeJs

If the executable is there, add the directory to your PATH.

Upvotes: 7

Related Questions