Skip to content

How To Build SerialPort Node module

Hancel Lin edited this page Jul 14, 2022 · 6 revisions

If your vscode version was updated and then the extension vsc-serialport-helper does not work properly. You can rebuild the Serial Port Node module to make it work.

  1. Install Node. https://nodejs.org/ Install the Last LTS version.
  2. Install node-gyp. https://github.com/nodejs/node-gyp#installation For different OS, you must install some other tool first.
  3. Open /<Your User Folder>/.vscode/extensions/hancel.serialport-helper-0.0.14/node_modules/@serialport/bindings in Terminal.
  4. Execute command node-gyp rebuild --target=<electron version> --arch=<ia32/x64> --dist-url=https://electronjs.org/headers. You can check it in VSCode Help > About. The arch must be the same as your platform.
  5. Open /<Your User Folder>/.vscode/extensions/hancel.serialport-helper-0.0.13/node_modules/usb-detection in Terminal. Execute the same command.
  6. And then restart your vscode. It will work.
Clone this wiki locally