Error: `gyp` failed with exit code: 1
See original GitHub issueNode 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:
- Created a year ago
- Comments:11 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I removed
<%app_data%>/Local/node-gyp/Cache
,<%user%>/.electron-gyp
,node_modules
,package-lock.json
then reinstalled all packages and it works now.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… Ornpx 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.