serialport on main process of electron causing error 'cannot find module @serialport/parser-inter-byte-timeout' after bundling #2913
Unanswered
MateusRosario
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
OS: Windows 10
Version: 12.0.0
Electron: 32.0.1
Electron Forge: 7.5.0
I am using serialport with electron on main process, and is working fine on dev env, but when I build and bundle the application with Electron Forge and try to execute it, the '@serialport/parser-inter-byte-timeout' is not found.
The index.js from serialport calls these modules on line 16:
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("@serialport/parser-byte-length"), exports);
__exportStar(require("@serialport/parser-cctalk"), exports);
__exportStar(require("@serialport/parser-delimiter"), exports);
__exportStar(require("@serialport/parser-inter-byte-timeout"), exports);
__exportStar(require("@serialport/parser-packet-length"), exports);
__exportStar(require("@serialport/parser-readline"), exports);
__exportStar(require("@serialport/parser-ready"), exports);
__exportStar(require("@serialport/parser-regex"), exports);
__exportStar(require("@serialport/parser-slip-encoder"), exports);
__exportStar(require("@serialport/parser-spacepacket"), exports);
__exportStar(require("./serialport-mock"), exports);
__exportStar(require("./serialport"), exports);
For some reason Electron Forge does not bundled the 'parser-inter-byte-timeout' together. Some suggestion? Is it an issue on how the packages are imported?
Beta Was this translation helpful? Give feedback.
All reactions