Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node-GYP failed with exit code: 1

I have to use node-usb in electron.atom to use that I am trying to install node-gyp and I am facing a Issue.

gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\Name\AppData\Roamin
g\npm\node_modules\node-gyp\lib\configure.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_proces
s.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\name\\
AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Name\Desktop\electron-quick-start
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

I found few same tickets on stackoverflow I have tried them all. Still No success.

Has anyone found any solution for this problem.

like image 667
Enigmatic Avatar asked Apr 29 '26 20:04

Enigmatic


1 Answers

I suggest that you narrow down the possible causes to the failure by following the steps in this Github Issue from node-gyp:

xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools

Hope this helps.

like image 152
Dmitry Avatar answered May 02 '26 08:05

Dmitry