npm install error - MSB3428: Could not load the Visual C++ component “VCBuild.exe”

前端 未结 16 2200
旧时难觅i
旧时难觅i 2020-11-29 14:17

I\'m trying to use the

npm install steam

but I am getting an error saying

I\'m not sure how to fix this and I have gotten

相关标签:
16条回答
  • 2020-11-29 15:15

    Look at the installation instructions for node-gyp - you can't just npm install node-gyp. I see you've installed Visual C++, but there's more to it.

    What version of windows do you have? If I knew that I might be able to tell you which part of the node-gyp instructions you didn't do, but check them out and you should be able to figure it out. I've gone through a bit of pain for this stuff too.

    0 讨论(0)
  • 2020-11-29 15:16

    As Matt said (https://stackoverflow.com/a/43323045/2767413) you should install the build-tools for windows. However, I did it via cmd and got an error, although I am the administrator -

    Please restart this script from an administrative PowerShell!
    The build tools cannot be installed without administrative rights.
    To fix, right-click on PowerShell and run "as Administrator".
    

    I got the same error via a PowerShell.

    For windows 7, the administrative PowerShell can be found under:

    Control Panel -> System and Security -> Administrative Tools -> Windows PowerShell Modules

    0 讨论(0)
  • 2020-11-29 15:19

    It's mentioned in the Documentation clearly as below: https://github.com/nodejs/node-gyp#installation

    Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

    npm install --global --production windows-build-tools 
    
    0 讨论(0)
  • 2020-11-29 15:19

    I managed to get it working by following Option 2 on the Windows installation instructions on the following page: https://github.com/nodejs/node-gyp.

    I had to close the current command line interface and reopen it after doing the installation on another one logged in as Administrator.

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