NPM install fails with node-gyp

前端 未结 9 546
闹比i
闹比i 2021-01-31 04:09

We are having problems running \"npm install\" on our project. A certain file cannot be found :

fatal error C1083: Cannot open include file: \'w         


        
9条回答
  •  面向向阳花
    2021-01-31 04:43

    Post my solution here in case anyone like me using Windows 10 still has the error after installing many Microsoft associated build tools.

    All you need are:

    Windows 10 64 bit

    python 2.7.x

    Visual Studio 2013

    I've tried Visual Studio 2015 before but it didn't work at all.


    1. First of all, I uninstall all the Microsoft associated build tools. (If you didn't install anything to try to solve this problem before, skip this step.)

    2. Install Visual Studio 2013.

    3. Config npm as @Sourav said:

    Config python:

    npm config set python /path/to/python2.7
    

    Config msvs_version:

    npm config set msvs_version 2013
    

    Run a npm install or the npm command which occurs this error. It works for me!

    BTW, this solution is from here.

提交回复
热议问题