[英]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.我必须在 electron.atom 中使用 node-usb 才能使用我正在尝试安装 node-gyp 并且我面临一个问题。
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.我在 stackoverflow 上发现了几张相同的票,我都试过了。 Still No success.仍然没有成功。
Has anyone found any solution for this problem.有没有人找到这个问题的任何解决方案。
I suggest that you narrow down the possible causes to the failure by following the steps in this Github Issue from node-gyp
:我建议您按照来自node-gyp
Github 问题中的步骤缩小失败的可能原因:
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.希望这会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.