Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node_modules js files not loaded #275

Open
makaay007 opened this issue Jan 17, 2024 · 0 comments
Open

Node_modules js files not loaded #275

makaay007 opened this issue Jan 17, 2024 · 0 comments

Comments

@makaay007
Copy link

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:

  • OS: Windows
  • Nx Electron Version : 16.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant