我必须在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我在stackoverflow上发现了几张相同的票,我都试过了。还是没有成功。
有没有人找到解决这个问题的办法。
发布于 2017-11-27 08:46:31
我建议您按照node-gyp的这个Github Issue中的步骤来缩小失败的可能原因
xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools希望这能有所帮助。
https://stackoverflow.com/questions/47285532
复制相似问题