问题
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