问题描述
打开别人的node.js项目进行运行,发现如下错误,提示模块版本与node.js版本冲突
解决步骤
1.找到项目node_modules路径下的@serialport文件,将其删除
2.在项目路径下打开cmd命令行,输入npm install seralport,下载过程中可能出现网速过慢,或者直接提示无法连接的状况,可以先修改下载镜像:npm config set registry https://registry.npm.taobao.org,修改完毕后可用npm config get registry命令查看是否修改成功,修改该完毕后再次执行npm install seralport指令,下载成功。