Electron.NET
Electron.NET copied to clipboard
Node Module is not working after packaging the application
Hi, I install node module with NPM and its working fine in development environment, but getting " Cannot find module" error in application after packaging it.
Found any fix getting same issues?
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!
Same issue here, 23.6.1.
Is there any known fix for this? For some reason it only happens with a specific module: @microsoft/signalr, other modules work fine (for example: fs, source-map-js).
Edit:
Solved by adding the module to the allowlist of nodeExternals in my webpack.config.js file. No idea why I only had to do it for this specific module though. I also had to add these lines:
resolve: {
extensions: ['.js', '.jsx', '.ts'],
}