I've created in Visual Studio 2019 a default Angular project with .NET Core 3.0.
When I build the project and run it, I obtain the following error:
error : Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE.
And when the web page starts I obtain exceptions, like in the image at the end of the post.
I know that the error is easy to fix: I need only to download and install Node.js. But I'd like to know why I need to do it, since in the Visual Studio Installer the Node.js option is selected, so it should be already installed. You can see it in my Visual Studio Installer window (sorry, it's in Italian, but you can see Node.js that's already installed anyway).
Is there a way to fix the problem and use the node.js retrieved with Visual Studio installation instead of installing a second one?
EDIT:
I've found the node.exe executable installed by Visual Studio in C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\NodeJs
.
I've added the path to External Web Tools
in Options->Web Package Management
, but the error remains.
I'm setting the path in the wrong place, or there's something else?
I've also noticed that in the .csproj, it refers to node executable with node
instead of node.exe
. I've also changed this but with no results.