npm install fails with error C2373 with vs2015 update 3

This error stays in relation with npm, node-gyp and Visual Studio 2015 and is already fixed in node-gyp@3.4.0, but npm is still pointing to an old version. As I workaround I can propose this:

  1. Go to your folder where npm is installed, e.g.:
    C:\Program Files\nodejs\node_modules\npm

  2. Open: package.json

  3. Remove entry for node-gyp in bundleDependencies

  4. Bump version number to 3.4.0 for node-gyp in dependencies

  5. Make a npm i in this directory to install node-gyp@3.4.0 to fix the problem

Relating GitHub issues can be found here:

  1. nodejs/node#7286
  2. nodejs/node-gyp#956
  3. npm/npm#13199
  4. npm/npm#13200

Leave a Comment