上图蓝色方框里面的就是需要手动编辑的模块上图是ref就只需要编辑ref目录所以只需要做第二步
cd node_modules/
- cd @serialport/
cd bindings/
进入这个目录以后运行
node-gyp rebuild --target=1.8.4 --arch=ia32 --dist-url=https://npm.taobao.org/mirrors/atom-shell
(target是electron的版本号) - 然后进入下一个模块ref再进行这一步
node-gyp rebuild --target=1.8.4 --arch=ia32 --dist-url=https://npm.taobao.org/mirrors/atom-shell
(target是electron的版本号) - 最后进入ffi模块再运行上述命令
所有原生模块手动编辑完成之后就可以运行成功了