OS: win 10 Node.js : v12.18.3 electron: v10.1.1
print version from js program: process.versions.node 12.16.3 process.versions.modules 82
install serialport by: npm install serialport
npm start and get error:
Error: The module '\?\D:\node\Tester\node_modules@serialport\bindings\build\Release\bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 82. Please try re-compiling or re-installing
the module (for instance, using npm rebuild
or npm install
).
- npm install --save-dev electron-rebuild .\node_modules.bin\electron-rebuild
Rebuild Complete
- npm start and the error again.
Error: The module '\?\D:\node\Tester\node_modules@serialport\bindings\build\Release\bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 82. Please try re-compiling or re-installing
the module (for instance, using npm rebuild
or npm install
).
What should be noticed is, both v12.18.3 and 12.16.3 has NODE_MODULE_VERSION 72. and no version gets 82. I don't know where the '82' comes from. How can I sovle it? Thanks.