electron使用serialport通信

1)在package.json文件中引入下列node_modules

"serialport": "^7.1.5"
"electron-rebuild": "^1.11.0"

2)依赖环境安装 【 管理员身份打开命令行 】

npm install --global --production windows-build-tools
npm install node-gyp

3)重新编译

.\node_modules.bin\electron-rebuild.cmd

4)启动调试

npm run dev

你可能感兴趣的:(electron使用serialport通信)