You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the code of conduct that this project uses.
I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.0.0-beta.63
Electron version
16.0.8
Operating system
Windows 10
Last known working Electron Forge version
6.0.0-beta.63
Expected behavior
After Hot-Reloading during electron-forge start the installed node-modules should still be findable. and the variable in the path should not turn into undefined.
Actual behavior
I've installed better-sqlite3 and wrote some code using it. Then I started up the application using electron-forge start and everything just worked. Then I made an adjustment and the app reloaded, but stopped running with this error in dev tools:
node:internal/modules/cjs/loader:940 Uncaught Error: Cannot find module 'undefinedbuild/Release/better_sqlite3.node'
Require stack:
- electron/js2c/renderer_init
at Module._resolveFilename (node:internal/modules/cjs/loader:940)
at Function.o._resolveFilename (node:electron/js2c/renderer_init:33)
at Module._load (node:internal/modules/cjs/loader:785)
at Function.c._load (node:electron/js2c/asar_bundle:5)
at Function.o._load (node:electron/js2c/renderer_init:33)
at Module.require (node:internal/modules/cjs/loader:1012)
at require (node:internal/modules/cjs/helpers:94)
at new Database (database.js?4c26:48)
at openDB (openDB.ts?4563:7)
at getIndex (getIndex.ts?af7b:8)
After closing it and reissuing electron-forge start it proceeded to run as intended, Until I reload once. then this error messages appears again.
When I reload the app some variable seems to be set to undefined and the module discontinues to be findable
Steps to reproduce
follow this guide to setup electron with typescript and react
Install better-sqlite3
add this to a .ts file (I do not know if it makes a difference, for this scenario, having it in .ts or .tsx, i do have it in a .ts file)
import Database from 'better-sqlite3';
export const openDB = () => {
const db = new Database('test.db', {});
return db;
};
run electron-forge start
make a change to trigger Hot-Reload
Additional information
No response
The text was updated successfully, but these errors were encountered:
Pre-flight checklist
Electron Forge version
6.0.0-beta.63
Electron version
16.0.8
Operating system
Windows 10
Last known working Electron Forge version
6.0.0-beta.63
Expected behavior
After Hot-Reloading during
electron-forge start
the installed node-modules should still be findable. and the variable in the path should not turn into undefined.Actual behavior
I've installed better-sqlite3 and wrote some code using it. Then I started up the application using
electron-forge start
and everything just worked. Then I made an adjustment and the app reloaded, but stopped running with this error in dev tools:After closing it and reissuing
electron-forge start
it proceeded to run as intended, Until I reload once. then this error messages appears again.When I reload the app some variable seems to be set to undefined and the module discontinues to be findable
Steps to reproduce
electron-forge start
Additional information
No response
The text was updated successfully, but these errors were encountered: