bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
307 stars 82 forks source link

Node_modules js files not loaded #275

Open makaay007 opened 5 months ago

makaay007 commented 5 months ago

Describe the bug I have a frontend project and an electron project generated with nx g nx-electron:app <electron-app-name> --frontendProject=<frontend-app-name> Running nx run <electron-app-name>:make [--options] the .exe generated is blank In the console I see this error: Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with runInInjectionContext related to platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.error(err)); in main.ts file

In the app console I see that node modules js files from the frontend project are not loaded. However if I unpack app.asar (or if i run make command with --asar=false) and I go to the folder I can see that js files are there

Expected behavior Expect to have the js files loaded and to have the exe working correctly

Desktop: