MSB3411 Could not load Visual C++ component

后端 未结 4 2187
予麋鹿
予麋鹿 2021-02-15 14:08

I have MS Visual Studio 2012 Ultimate and OS is Windows 7, and have nodeJs installed.I wanted to install socket.io using npm,but I get the following error.

C:\\U         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-15 14:42

    Make sure you have all the pre-requisite software to run node-gyp:

    • https://github.com/TooTallNate/node-gyp

    You can configure version of Visual Studio used by gyp via an environment variable so you can avoid having to set the --msvs_version=2012 property.

    Examples:

    • set GYP_MSVS_VERSION=2012 for Visual Studio 2012
    • set GYP_MSVS_VERSION=2013e (the 'e' stands for 'express edition')

    For the full list see - https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294

    This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I'm lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.

    Feel free to add your vote at:

    • https://github.com/joyent/node/issues/8005#issuecomment-50545326

提交回复
热议问题