![]() 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. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |