


That's it! Reinstalling Visual C++ Build Tools should resolve the error you were experiencing. If the error has been resolved, your application should run without issue. This command starts your Node.js application.
#Node js visual studio code code
Here is an example code snippet to illustrate the process: Run the installer and select the "Visual C++ build tools" option.įollow the prompts to complete the installation.Īfter the installation is complete, open your Node.js project and try running it again. Go to the Visual Studio website and download the Visual C++ Build Tools installer. To fix the error C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 when using Node.js, you can try reinstalling Visual C++ Build Tools. Method 2: Reinstall Visual C++ Build Tools Overall, installing Visual C++ Build Tools and using the windows-build-tools package can help resolve the "MSBuild.exe failed with exit code: 1" error in Node.js. The module exports a function called "hello" that returns a greeting message. In this example, we are requiring a native Node.js module called "addon" that was built using the windows-build-tools package. Once the installation is complete, open your Node.js project and run the following command in the terminal:Ĭonst addon = require ( './build/Release/addon' ) console. Open Visual C++ Build Tools and select "Visual C++ build tools" and "Windows 10 SDK" under "Workloads".Ĭlick "Install" and wait for the installation to finish.
#Node js visual studio code install
Here are the steps:ĭownload and install Visual C++ Build Tools from the official Microsoft website.

To fix the error "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1" in Node.js, you can try installing Visual C++ Build Tools. The root cause of this issue is typically that the required Visual C++ Build Tools are not installed or not configured correctly on the system. The "Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1" is a common error message encountered by Node.js developers when trying to build or install certain native modules on Windows.
