Open johannesgiani opened 1 year ago
6.0.4
v22.0.2
macOS 11.3
No response
Native module should be loaded inside renderer in development and in the packaged app.
During development native modules work just fine but in the packaged app it cannot find the native module:
Uncaught Error: Cannot find module '/native_modules/build/Release/hello_world.node'
native-hello-world
forge.config.ts
index.ts
npm start
npm run package
Here is also a link to a repository with the code following the steps above.
Did you get it to work in the end?
Pre-flight checklist
Electron Forge version
6.0.4
Electron version
v22.0.2
Operating system
macOS 11.3
Last known working Electron Forge version
No response
Expected behavior
Native module should be loaded inside renderer in development and in the packaged app.
Actual behavior
During development native modules work just fine but in the packaged app it cannot find the native module:
Steps to reproduce
native-hello-world
forge.config.ts
andindex.ts
to create a browser window with node integration enablednpm start
. It should worknpm run package
and open it: doesn't workHere is also a link to a repository with the code following the steps above.
Additional information
No response