NPM install fails with node-gyp

前端 未结 9 535
闹比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:56

    Try to install again with --force option:

    npm install --force
    

    If this doesn't work try to update npm globally:

    npm update -g npm 
    

    and try again with the --force option.

    0 讨论(0)
  • 2021-01-31 04:57

    The last time I saw a similar error it was because I was using the wrong version of npm and/or node for one of my dependencies. Try upgrading these and try again.

    Before trying again remove your node_modules directory.

    You may need to investigate what versions of npm and node your dependencies need. You could try the latest versions of all your dependencies, node and npm.

    Check what versions your colleagues are using.

    What OS are you using? That can have an impact as version of CLANG maybe different.

    0 讨论(0)
  • 2021-01-31 04:58

    For Windows 8 or 10:

    Assuming node and npm installed already.

    My node and npm version (At the time of writing this answer) :

    node : 8.9.4

    npm : 5.6.0

    1. First install python 2.x

    2. Make sure it is available on path

    3. Install Visual Studio Installer

    4. After installation, run it

    5. A new interface will open it where you can select various options.
    6. Now select Build Tools for Visual Studio 2017 from the available options and install it. You don't need to install Visual Studio.

    After the installation it should work perfectly.

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