首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"serialport“节点模块版本错误消息混淆

"serialport“节点模块版本错误消息混淆
EN

Stack Overflow用户
提问于 2018-11-24 04:21:41
回答 1查看 835关注 0票数 2

下面的节点错误是否意味着我需要升级串口模块,或者降级nodejs,或者其他什么?(在我将ubuntu从16.04升级到18.04之前,它一直起作用)

代码语言:javascript
复制
Error: The module '../node_modules/@serialport/bindings/build/Release/bindings.node' 
was compiled against a different Node.js version using 
NODE_MODULE_VERSION 67. This version of Node.js requires 
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

我试过了:

代码语言:javascript
复制
rm package-lock.json;
rm -rf node_modules;
npm install
npm rebuild
npm install serialport --build-from-source
sudo npm install serialport --unsafe-perm --build-from-source

有没有简单的方法来解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2018-11-24 05:59:43

完全移除nodejs npm,重新安装,运行nodejs main.js,然后根据需要使用npm安装包。现在起作用了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53452548

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档