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

See original GitHub issue

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 error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_global\node_modules\node-gyp\lib\configure.js:284:16)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19044
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_global\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\tlx\Desktop\electron-quick-start-master\dll
gyp ERR! node -v v12.22.12
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
michalzaq12commented, Sep 12, 2022

I removed <%app_data%>/Local/node-gyp/Cache, <%user%>/.electron-gyp, node_modules, package-lock.json then reinstalled all packages and it works now.

0reactions
DeeDeeGcommented, Nov 9, 2022

A possible easier solution could be to run: npx node-gyp install, which reinstalls node-gyp’s copy of the C development headers for the running version of NodeJS.

(If you need to reinstall headers for a different version of NodeJS or Electron, more arguments may be needed. Such as npx node-gyp install 16.0.0 to [re]install headers for NodeJS 16.0.0… Or npx node-gyp install --dist-url=https://electronjs.org/headers 18.0.0 to install headers for Electron 18.0.0, I think.)

If this doesn’t work, then @michalzaq12’s comment above seems like a more thorough solution.

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 >
node-gyp ERR! stack Error: gyp failed with exit code: 1 #2025
Node Version: $ node -v v8.11.3 $ npm -v 6.5.0; Platform: Windows 10 Pro; Compiler: msbuild; Module: weak.
Read more >
node-gyp Error: `gyp` failed with exit code: 1 (macOS | NPM)
If you're working with npm or yarn you might get this error after updating your node, npm or yarn this is a very...
Read more >
How to fix error: `gyp` failed with exit code: 1? - Error Solutions
The gyp error code 1 means that there was a general error during the compilation process. This could be caused by a number...
Read more >
Debugging "Make Failed with Exit Code 2" Error - CodeForGeek
Try re-installing node-gyp again. npm i -g node-gyp. You may require sudo access depending upon your node installation. Debug #4: Update Node ...
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