forge
forge copied to clipboard
Cannot run packaged app with tadeious or mssql package
Pre-flight checklist
- [x] I have read the contribution documentation for this project.
- [x] I agree to follow the code of conduct that this project uses.
- [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.5.0
Electron version
v32.1.2
Operating system
Windows 11
Last known working Electron Forge version
No response
Issue
I'm encountering issues with packaging my Electron app using Electron Forge, especially regarding including the mssql
module. The module works fine in the development environment but fails to load in the packaged version. Additionally, I have tried using the tedious
package, and I am running into similar issues.
I started creating the app using vite-typescript template.
The errors vary depending on the configuration:
-
Without marking
mssql
as external invite.config.js
: In this case, the development version fails to run, giving the following error:TypeError: Cannot read properties of undefined (reading 'get') at _interopNamespaceDefault
-
With marking
mssql
as external invite.config.js
: The development version works, but when I package the app using Electron Forge, I get the following error when trying to start the app:Error: Cannot find module 'mssql'
I also tried disabling asar
and contextIsolation
but that does not help.
How do you get some of these packages running?
Actual behavior
The app does not run in packaged mode when this packaged are used.
Steps to reproduce
- Create a project with typescript-vite template
- Add sample page communicating to MSSQL server over Bridge
- Run the app
- Error appears
Additional information
No response