Troubles with NPM and node-gyp in Windows

后端 未结 5 864
独厮守ぢ
独厮守ぢ 2020-12-17 00:12

I have some troubles with npm packages on my Windows workstation... I have a set of NPM dependencies in my package.json file:

\"devDependencies\": {
    \"babel-p         


        
相关标签:
5条回答
  • 2020-12-17 00:26

    From the official website: https://www.npmjs.com/package/node-gyp

    You should do following cmd: (In my computer, I installed vc2015)

    $ node-gyp configure --msvs_version=2015

    0 讨论(0)
  • 2020-12-17 00:34

    I created an issue on github for node-gyp. And also here is a disscussion of a similar problem. Probaly it not helped me, but maybe it can be useful for someone else.

    0 讨论(0)
  • 2020-12-17 00:40

    Write those code in admin command prompt:

    npm install --global --production windows-build-tools
    

    And then hit enter.

    0 讨论(0)
  • 2020-12-17 00:40

    Windows open PowerShell in administrative tool and run this command

    npm install --global --production windows-build-tools 
    
    0 讨论(0)
  • 2020-12-17 00:50

    You need Microsoft Visual C++ build tools, which are packaged with Visual Studio. However, they are now also available as a standalone download. After installing these tools and restarting your computer, you should be able to install packages that use node-gyp under the hood.

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