MSB3411 Could not load Visual C++ component

后端 未结 4 2199
予麋鹿
予麋鹿 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:37

    I think I found it. Try:

    npm install websocket@1.0.3
    

    I found it here

    0 讨论(0)
  • 2021-02-15 14:42

    Install dotnet 3.5, so the websockets may be compiled

    http://www.microsoft.com/en-us/download/details.aspx?id=21

    0 讨论(0)
  • 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
    0 讨论(0)
  • 2021-02-15 14:43

    Sorry to dig up an old question, but your question is the first result when I searched for "Socket.io VCBuild"

    The solution I found, after stumbling around on StackOverflow was:

    npm install socket.io --msvs_version=2012

    Update from @petf-felzmann. If you're using VS 2015 you can use:

    npm install socket.io --msvs_version=2015

    0 讨论(0)
提交回复
热议问题