Error in installing node.js module using npm

2019-01-23 04:00发布

I am trying to install the following module using node.js, but keep on getting the following error. Do you have any suggestions on what I should do? So I am using windows 7 and have installed .NET Framework 2.0 SDK as well.

npm install execSync

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". 
To fix this, 1) install the .NET Framework 2.0 SDK, 
2) install Microsoft Visual Studio 2005 or
3) add the location of the component to the system path if it is installed elsewhere.

标签: node.js npm
7条回答
Root(大扎)
2楼-- · 2019-01-23 04:32
npm install -g windows-build-tools

ran in an administration window:

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Waiting for installers... -Successfully installed Python 2.7
Waiting for installers... /Successfully installed Visual Studio Build Tools.
查看更多
女痞
3楼-- · 2019-01-23 04:35

You need to add VCBuild.exe to your path. Check out this answer on how to do it: Testacular install fails, no vcbuild.exe

查看更多
▲ chillily
4楼-- · 2019-01-23 04:37

Interestingly, even after installing Visual Studio 2015 and adding the path to VCBuild.exe to Environment Variables -> PATH, this error was occuring when i tried to npm install. Restarting the machine didn't resolve the error. I tried starting the app using node app.js and it works!

查看更多
可以哭但决不认输i
5楼-- · 2019-01-23 04:40
 npm install --global --production windows-build-tools

will resolve 90% of the install issues in windows for node

查看更多
Animai°情兽
6楼-- · 2019-01-23 04:45

This steps helped me a lot:

"According to the readme file in Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1, to ensure that your system has a supported configuration, uninstall the following products and then reinstall them in the order listed:"

1 - Visual C++ 2010 Express or Visual Studio 2010
2 - Windows SDK 7.1 Note: If you get error on installation, maybe this link will help you.
3 - Visual Studio 2010 SP1
4 - Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1

For me, only the step two was enough. Pay attention in second step's note "Note: If you get error on installation, maybe this link will help you". I had problem and this tip was important.

For more information, this link can be useful: https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup

查看更多
Root(大扎)
7楼-- · 2019-01-23 04:45

After trying various .Net and Visual I finally managed to get npm to load and build mongoose on Windows 8.1 by downloading Visual Studio 2013 Prof

ftp://ftp.microsoft.com/bussys/winsock/winsock2/qos.h

查看更多
登录 后发表回答