【问题标题】:Node-GYP failed with exit code: 1Node-GYP 失败,退出代码:1
【发布时间】:2018-04-27 09:17:01
【问题描述】:

我必须在 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 上发现了几张相同的票,我都试过了。还是没有成功。

有没有人找到任何解决这个问题的方法。

【问题讨论】:

  • 我也在做一个类似的应用程序的可行性,其中应用程序应该使用电子框架开发并且应用程序应该能够从 USB 读取文件。

标签: javascript usb electron electron-builder electron-packager


【解决方案1】:

我建议您按照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

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多