Node-gyp: bin\MSBuild.exe` failed with exit code: 1

Created on 23 Jan 2020  路  6Comments  路  Source: nodejs/node-gyp


No matter what I do I can't get node-gyp to work when installing npm install scrypt.
I have Visual Studio 2015 installed.
My npm version is 6.13.34

I have tried this with Visual Studio 2017 and 2019, but I keep getting the same error.
Please help.

This is the error I get:

  C:\Users\mudge\AppData\Roaming\npm\node_modules\scrypt\node_modules\nan\nan.h(1740): note: see declaration of 'Nan::Callback::Call'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\mudge\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mudge\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\mudge\AppData\Roaming\npm\node_modules\scrypt
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mudge\AppData\Roaming\npm-cache\_logs\2020-01-23T02_07_06_794Z-debug.log
  • Node Version:
  • Platform:
  • Compiler:
  • Module:

Verbose output (from npm or node-gyp):

Paste your log here, between the backticks. It can be:
  - npm --verbose output,
  - or contents of npm-debug.log,
  - or output of node-gyp rebuild --verbose.

Most helpful comment

I fixed it by downgrading node to node-v10.18.1. This doesn't seem like a good solution.
Before I was using node 12.14.1. Why does it break in the newer version of node?

All 6 comments

I fixed it by downgrading node to node-v10.18.1. This doesn't seem like a good solution.
Before I was using node 12.14.1. Why does it break in the newer version of node?

Because the module needs to be updated to work with Node.js 12: https://github.com/barrysteyn/node-scrypt/issues/193, https://github.com/barrysteyn/node-scrypt/pull/197

I got exactly the same problem as @mudgen.
System: Windows10
Node version: v12.14.1
node-gyp version: v6.1.0
python27 correctly installed and configured
Visual studio 2019 installed
Visual C++ Build Tools 2015 installed by following these instructions
And also try with/without following configuration:
npm config set msvs_version 2015 --global.
All these don't work in my case.

Thanks to @mudgen , downgrading node to node-v10.18.1 works for me.
It doesn't sound like a correct solution but it works!
For Windows user, you can simply uninstall your node and find the v10.18.1 node here.

Thanks to @mudgen , downgrading node to node-v10.18.1 works for me.
It doesn't sound like a correct solution but it works!

As I pointed out above, the problem is with the scrypt module not supporting Node.js 12. You'll need to get the author of that module to update it so that it works on later versions of Node.js or find an alternative (or stick to Node.js 10).

Guys @richardlau even am facing this issue for a while, couldn't install node_modules, any fix ?? i tried every method by @keweixinfr and @mudgen nothing works...

i got the same issue aswell

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yamakaky picture Yamakaky  路  3Comments

alexeyvo picture alexeyvo  路  3Comments

meldsza picture meldsza  路  3Comments

lopezdp picture lopezdp  路  3Comments

Sentero-esp12 picture Sentero-esp12  路  3Comments