-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Angular: Failed to fetch dynamically imported module .angular/cache/17.0.8/vite/deps/ion-app_8.entry.js?import #1060
Comments
This bug haunted me for most one week but thankfully @mhartington made a quick fix by transition the Angular project to standalone. I know @DominikPieper is aware of it and I'm waiting on their directions to take on the next step. I'll gladly offer to make the fix following Mike's code if they feel it is the right way to go about a definite solution for this |
this issue is painful fix it faster please |
This seems to be an issue with angular's integration with vite. This same issue was opened up on Ionic's repo, but they neglected to fix it as, at the time they wrote that comment, this integration wasn't production ready and the default webpack solution is working ok. I've confirmed that the webpack based solution works fine in our case. To fix the angular application that gets created, you need to change two lines in the project's {
"name": "mobile-app",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"prefix": "my-mobile-app",
"sourceRoot": "apps/mobile-app/src",
"tags": [],
"targets": {
"build": {
- "executor": "@angular-devkit/build-angular:application",
+ "executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/mobile-app",
"index": "apps/mobile-app/src/index.html",
- "browser": "apps/mobile-app/src/main.ts",
+ "main": "apps/mobile-app/src/main.ts", The first change is to change the executor from The second change is to update the Going forward, the template should probably use the webpack builder and the issue opened either on ionic or angular's side. The issue might be related to another open issue angular has. |
@RyanClementsHax Thanks for the tip will work on it hopefully something concrete will come up |
@RyanClementsHax Thanks Sir it worked !!!🤣😂 |
@RyanClementsHax I second the thanks 🥳 This definitely corrects the issue! |
It works! |
Describe the bug
The Ionic Angular app successfully complies however, when I open the app in browser, It doesn't load and I see a lot of errors in console.
To Reproduce
Steps to reproduce the behavior:
npx create-nx-workspace
npm install --save-dev --exact @nxext/ionic-angular
in project foldernx generate @nxext/ionic-angular:application myApp
nx run my-app:serve:development
http://localhost:4200
Expected behavior
A clear and concise description of what you expected to happen.
I can see the app loaded in browser successfully and not see a white screen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: