【问题标题】:Node module was compiled against diffferent node module 67节点模块是针对不同的节点模块编译的 67
【发布时间】:2019-10-08 11:40:33
【问题描述】:

我有一个在节点模块版本 67 下编译的节点项目,但现在我收到一个错误,它需要节点模块版本 69。

usb_bindings.node was compiled against a different Node.js version using
NODE_MODULE_VERSION 67. This version of Node.js requires
NODE_MODULE_VERSION 69. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).at process.module.(anonymous function) [as dlopen]

有谁知道我该如何解决这个问题?

【问题讨论】:

标签: node.js electron electron-packager


【解决方案1】:

您可能指的是编译 node-usb 模块, 本文展示了如何正确重新编译 https://electronjs.org/docs/tutorial/using-native-node-modules

cd /path-to-module/
npm install -g node-gyp
node-gyp rebuild --target=1.2.3 --arch=x64 --dist-url=https://electronjs.org/headers
//replace target version with your version of electron

【讨论】:

    猜你喜欢
    • 2020-01-09
    • 2016-06-07
    • 2019-12-19
    • 2016-09-24
    • 1970-01-01
    • 1970-01-01
    • 2012-08-27
    • 2018-05-17
    • 2017-09-17
    相关资源
    最近更新 更多