node.js - 节点模块是针对不同的节点模块编译的 67
问题描述
我有一个在节点模块版本 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-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
推荐阅读
- angular - 在Angular 2+中注入自定义服务提供者的部门声明的新服务实例
- mysql - mysqli_real_connect(): (HY000/2002): 将mysql移动到不同分区后没有这样的文件或目录
- python - 芹菜错误“收到 0x00 而期待 0xce”
- assembly - 具有相同目标和源操作数的 MOV 指令
- excel - 取消保护工作表时跳转到错误处理程序
- reactjs - typescript/flow 中的 [type] 是什么意思?
- excel - 如何将数组的数据导出到excel,数组中的每个元素存储在单行中
- reactjs - 发送参数以获取 getInitialProps react 和 nextjs
- vue.js - 为什么 vue.js 不会更新 DOM?
- react-native - React Navigation 中有没有办法将参数从一个选项卡发送到另一个选项卡?