Node module was compiled against diffferent node module 67

℡╲_俬逩灬. 提交于 2021-02-05 12:15:53

问题


I have a node project that was compiled under node module version 67, but now i am getting an error that it requires node module version 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]

Does anyone know how i could resolve this issue?


回答1:


You may be referring to compiling the node-usb module, This article shows how to re-compiling correcly 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



来源:https://stackoverflow.com/questions/56249103/node-module-was-compiled-against-diffferent-node-module-67

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!