Closed mburger81 closed 7 years ago
I updated my project to @ionic/app-scripts@3.1.8
and it solved the problem.
In my case the problem was that some individual pages (views) in my app included module declaration in their respective folders, but they were also declared in the AppModule, so there was a duplicate declaration.
Getting rid of <pagename>.module.ts
files (i.e. getting rid of either one of the duplicate declarations) solved the issue for me.
I'm somewhat concerned this was not pointed out during debug
builds, but I'm happy that the solution was so simple :)
The mvp comment of this issue thread is the best possible way to tackle this issue. For me, particularly, after I ran ngc compile on the whole project, the compiler screamed at me for passing parameters from html to functions and not expecting them on the functional parameters. It's a code mishap that got pass tsc but ultimately failed at aot compiler.
That being said, I have one more issue. When I run node_modules/.bin/ngc, it creates a lot of metadata, ngsummary, ngfactory and js/js.map files side by side with my actual .ts files. If I remove all of those then I go back to square one and see the issue the original poster mentioned. How do I tackle this issue of seeing 50 extra files (metadata/ngfactory/ngsummary) side by side with my actual .ts files?
Try run this command
$ ./node_modules/.bin/ngc
It will show the detail error part in your code, it saved my life trying to find what was causing the error. May this can help you.
Remove filename.module.ts from newly created page, its work for me
Short description of the problem:
Updating to ionic3.9 and ng5 on doing a production build with
ionic cordova build android --prod --release
I get this errorWhat behavior are you expecting?
I was not able to check which could be the problem, I'm able to reproduce the error on a new build copying my production files. The problem is, sometime I can remove a file and the build works, sometimes it does also not work on removing the same file, in this case I have to remove an other random file to get it work again. So there is no logic on which file to remove to get it work again.
So at the end, I can not reproduce the error!
Which @ionic/app-scripts version are you using?