【发布时间】:2020-01-09 18:27:40
【问题描述】:
我知道还有一个类似的问题,但这些答案都不适合我。
这是错误:
Uncaught Error: The module '/Users/sheshankshankar/Documents/serial-monitor-app/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 70. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.func (electron/js2c/asar.js:155)
at process.func [as dlopen] (electron/js2c/asar.js:155)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:828)
at Object.func (electron/js2c/asar.js:155)
at Object.func [as .node] (electron/js2c/asar.js:155)
at Module.load (internal/modules/cjs/loader.js:645)
at Function.Module._load (internal/modules/cjs/loader.js:560)
at Module.require (internal/modules/cjs/loader.js:685)
at require (internal/modules/cjs/helpers.js:16)
at bindings (/Users/sheshankshankar/Documents/serial-monitor-app/node_modules/bindings/bindings.js:112)
代码在这里。执行以下操作即可安装它。
git clone https://github.com/GreenBayRules/serial-monitor-app.git
# Go into the repository
cd serial-monitor-app
# Install dependencies
npm install
# Run the app
npm start
但事实并非如此。我得到那个错误。我尝试了以下方法:
npm install
npm rebuild
yarn install --force
删除节点模块
几乎所有其他答案都在这里:Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51
我的节点版本是v10.16.3
【问题讨论】:
标签: javascript node.js serial-port electron