使用electron-drag问题,electron-rebuild 报错

发布于 2022-09-11 20:22:02 字数 4415 浏览 12 评论 0

想使用electron-drag库实现窗口拖拽,引用后win-mouse模块会报NODE_MODULE_VERSION错误

clipboard.png
electron-rebuild重新编译win-mouse模块,会rebuild失败

λ ./node_modules/.bin/electron-rebuild
× Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | win32 | x64
gyp http GET https://atom.io/download/electron/v5.0.0/node-v5.0.0-headers.tar.gz
gyp http 200 https://atom.io/download/electron/v5.0.0/node-v5.0.0-headers.tar.gz
gyp http GET https://atom.io/download/electron/v5.0.0/SHASUMS256.txt
gyp http GET https://atom.io/download/electron/v5.0.0/win-x86/node.lib
gyp http GET https://atom.io/download/electron/v5.0.0/win-x64/node.lib
gyp http 200 https://atom.io/download/electron/v5.0.0/win-x64/node.lib
gyp http 200 https://atom.io/download/electron/v5.0.0/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v5.0.0/win-x86/node.lib
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Workspace\\ELECTRON\\new-skydrive_high\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=5.0.0" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd C:\Workspace\ELECTRON\new-skydrive_high\node_modules\win-mouse
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.0 | win32 | x64
gyp http GET https://atom.io/download/electron/v5.0.0/node-v5.0.0-headers.tar.gz
gyp http 200 https://atom.io/download/electron/v5.0.0/node-v5.0.0-headers.tar.gz
gyp http GET https://atom.io/download/electron/v5.0.0/SHASUMS256.txt
gyp http GET https://atom.io/download/electron/v5.0.0/win-x86/node.lib
gyp http GET https://atom.io/download/electron/v5.0.0/win-x64/node.lib
gyp http 200 https://atom.io/download/electron/v5.0.0/win-x64/node.lib
gyp http 200 https://atom.io/download/electron/v5.0.0/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v5.0.0/win-x86/node.lib
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Workspace\\ELECTRON\\new-skydrive_high\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=5.0.0" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd C:\Workspace\ELECTRON\new-skydrive_high\node_modules\win-mouse
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\spawn-rx\lib\src\index.js:267:84)
    at SafeSubscriber.__tryOrUnsub (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:205:16)
    at SafeSubscriber.error (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:156:26)
    at Subscriber._error (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:92:26)
    at Subscriber.error (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:72:18)
    at SafeSubscriber._next (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\spawn-rx\lib\src\index.js:242:65)
    at SafeSubscriber.__tryOrUnsub (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:205:16)
    at SafeSubscriber.next (C:\Workspace\ELECTRON\new-skydrive_high\node_modules\rxjs\internal\Subscriber.js:143:22)

请大家帮帮忙

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尐籹人 2022-09-18 20:22:02

是不是你的Electron版本太高了,我自己打包5.0.0以上的版本暂时都无法正常打包,但是4.0.6的版本可以

倦话 2022-09-18 20:22:02

我node用的8.16 electron用的2.0.0之后不会报这个版本错误,但是会报另一个错误
clipboard.png

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文