-
Notifications
You must be signed in to change notification settings - Fork 310
Uncaught Error: Cannot find module "./app.module.ngfactory" #556
Comments
We need more info or a repo that shows this issue. I cannot recreate it. What OS are you using, etc. What version of the ionic CLI, etc. Thanks, |
Sorry forgot to add:
Could it be possible that I missed a step while upgrading to 0.47? I've removed the .tmp folder I cannot give you access to our repo, but you can ask anything which I will try to answer. On 0.46 there was no problem. As stated on github I removed main.dev.ts and main.prod.ts and created the main.ts with:
|
This seems to be exact issue that is listed at #553 |
Can you try Can you also update I think minification may be breaking something. Please let me know how it goes. Thanks, |
@danbucholtz I test it and nothing happened and the result was still no ng.factory.module. |
is it possible typescript version or ngc config problem? |
Can you change your package.json to install Thanks, |
Posted in the wrong thread I saw... Thanks for reaching out! I've added "@ionic/app-scripts": "nightly", to my package.json Still the same error: Uncaught Error: Cannot find module "./app.module.ngfactory" at Object. (main.js:7) at e (main.js:1) at main.js:1 at main.js:1 When I open the package.json from
So I guess it is beta27 |
When I set typescript back to 2.0.9 and run
|
ionic run ios --prod has no issues with nightly version of app-scripts with typescript 2.0.9 and ionic 2.0.rc4 |
I can confirm this doesn't work with the android device using the latest nightly build and to add Device ready is fired after 20 seconds leading app to crash. Same works after reverting back to 0.0.45 version for android. |
@jayeshanandani that is a very bad news... |
In addition while running ionic run android --prod it throws the error of the ngfactory files not found. Don't know whether I am doing something wrong as earlier the ngfactory files were auto generated and I think prod version also uses AOT by default. In ios there are no errors thrown and it works perfectly fine. Don't know what is going wrong in android build. |
i am getting the following error as well when i run
|
After lots of trial and error with this package.json I've got it compiling again:
The problem was caused by angular2-maps (https://github.com/SebastianM/angular2-google-maps). This line in my app.module.ts throws the
I have no clue what possibly could be the problem since this is an object and not a function. |
@basvdijk : did 2.1.1 version of angular worked? As the ionic team mentioned in the upgrade to RC4 to upgrade all packages to 2.2.1. If 2.1.1 works well I would definitely love to work with latest app-scripts as they are super fast for build. |
2.1.1 worked, I literally use the package.json mentioned above. Where did you read about upgrading to 2.2.1? |
@basvdijk : https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#200-rc4-2016-12-15 see the package.json in Changelog that is mentioned. |
Hi all, This is resolved in Please let me know if you have any issues. Thanks, |
@danbucholtz still getting
On the Angular2-maps as described in my previous comment. Any thoughts on this one? |
Seems like it is not app-scripts issue rather its a 3rd party library issue: angular/angular#11262 (comment) |
Yeah, but it worked in 0.46 and RC3, then I upgraded to 0.47 and it broke. Unfortunately this happens almost every upgrade to another ionic / build scripts version. So I thought there might be a relation between the app script and my issue. |
There is a good chance it's not related to ionic or app-scripts at all. It could very well be the 3rd party lib is not using the latest version of Thanks, |
Then it works, but did the ngc version used changed from 0.46 to 0.47? |
Yes and no. It did not with Thanks, |
Ok thank so far! |
I don't really understand how the ngc could be broken on an upgrade? Is there any way to debug this, so I would at least have an idea of what library is making it crash or another starting point? This is what I'm currently running on: Cordova CLI: 6.5.0 Anyone has an idea for this? |
It could be any number of things, but any Angular specific libs that provide templates/providers/etc need to include Thanks, |
For me, reverting to [email protected] from @2.1.6 did the trick. |
I too am having this issue as mentioned at https://forum.ionicframework.com/t/how-to-diagnose-white-screen-on-startup-on-android-device/79387/7 |
Today solved this issue (without going back to TS 2.0) by changing my deps to
Because mentioned here: angular/angular#13294 |
Uh oh!
There was an error while loading. Please reload this page.
Short description of the problem:
When running
ionic run android --prod
The app starts on the device but the browser console on the device gives: 'Uncaught Error: Cannot find module "./app.module.ngfactory"'What behavior are you expecting?
A working app
Steps to reproduce:
Which @ionic/app-scripts version are you using?
0.47
The text was updated successfully, but these errors were encountered: