节点模块是针对不同的节点模块编译的 67

2024-03-23

我有一个在节点模块版本 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 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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

节点模块是针对不同的节点模块编译的 67 的相关文章

随机推荐