question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: `gyp` failed with exit code: 1 at ChildProcess.onCpExit

See original GitHub issue

Description: I tried to install several packages and I got the same error. The question is what happens when I want to configure: node-gyp configure --msvs_version = 2015

ERROR gyp info it worked if it ends with ok gyp info using node-gyp@3.6.1 gyp info using node@6.9.4 | win32 | x64 gyp info spawn C:\USER.windows-build-tools\python27\pythonw.exe gyp info spawn args [ ‘C:\USER\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py’, gyp info spawn args ‘binding.gyp’, gyp info spawn args ‘-f’, gyp info spawn args ‘msvs’, gyp info spawn args ‘-G’, gyp info spawn args ‘msvs_version=2015’, gyp info spawn args ‘-I’, gyp info spawn args ‘C:\WINDOWS\system32\build\config.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘C:\USER\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘C:\USER\.node-gyp\6.9.4\include\node\common.gypi’, gyp info spawn args ‘-Dlibrary=shared_library’, gyp info spawn args ‘-Dvisibility=default’, gyp info spawn args ‘-Dnode_root_dir=C:\Users\Lizandro Zerpa\.node-gyp\6.9.4’, gyp info spawn args ‘-Dnode_gyp_dir=C:\Users\Lizandro Zerpa\AppData\Roaming\npm\node_modules\node-gyp’, gyp info spawn args ‘-Dnode_lib_file=node.lib’, gyp info spawn args ‘-Dmodule_root_dir=C:\WINDOWS\system32’, gyp info spawn args ‘-Dnode_engine=v8’, gyp info spawn args ‘–depth=.’, gyp info spawn args ‘–no-parallel’, gyp info spawn args ‘–generator-output’, gyp info spawn args ‘C:\WINDOWS\system32\build’, gyp info spawn args ‘-Goutput_dir=.’ ] gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Lizandro Zerpa\AppData\Roaming\npm\node_modules\node-gyp\lib\confi gure.js:336:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command “C:\nodejs\node.exe” “C:\USER\AppData\Roaming\npm\node_modules\node-gyp\bin\ node-gyp.js” “configure” “–msvs_version=2015” gyp ERR! cwd C:\WINDOWS\system32 gyp ERR! node -v v6.9.4 gyp ERR! node-gyp -v v3.6.1 gyp ERR! not ok

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
gibfahncommented, Sep 10, 2017

@jeanru you need to run node-gyp rebuild in a directory that contains a binding.gyp.

3reactions
dhBunnycommented, Nov 11, 2019

I am getting this error every time I run a node-gyp command and when I try to install enmap and quick.db

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\matt\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ADRIÁN\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--msvs_version=2015"
gyp ERR! cwd C:\Users\matt\Music\Discord-All\DiscordiumBots\Customers-Bots\SCP Assistant
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v6.0.1
gyp ERR! not ok

I have Node.js v12.13.0, npm v6.12.0 and Python 2.7.16 In my directory, there is a binding.gyp file I created myself, it is empty as I don’t know if I have to add anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install with error: `gyp` failed with exit code: 1
If this is a mac machine (OSX) here is what you can do. use terminal xcode-select --print-path. then remove installed version
Read more >
Error: `gyp` failed with exit code: 1 · Issue #2714 - GitHub
Node Version: Node 12.22.12 and NPM 6.14.16 Node-Gyp Version: >= v9.1.0 Platform: Windows10 Module: node-gyp configure gyp ERR! configure ...
Read more >
Npm install with error: `gyp` failed with exit code: 1 Node-sass ...
Npm install with error: `gyp` failed with exit code: 1 Node-sass Error ... gyp ERR! stack at ChildProcess.emit (events.js:210:5)
Read more >
Error installing node-gyp on ubuntu - Intellipaat Community
I am using the below code: npm http 200 https://registry.npmjs.org/weak/-/weak-0.2.2 ... my other dependencies (express,phantom,ejs,aws-sdk ...
Read more >
Error: `gyp` failed with exit code: 1的解决方案 - CSDN博客
解决方案:1、进入node_modules,删除node-gyp2、执行npm i -g node-gyp3、删除node_modules4、执行npm i -d完成!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found