ionic-app-scripts build fails due to AOT
Short description of the problem:
Running ionic-app-scripts build fails with:
[21:56:53] Error: Cannot determine the module for class ClickBlock in
/Users/rolandjitsu/Projects/infarm/operator/node_modules/ionic-angular/util/click-block.d.ts!
[21:56:53] Cannot determine the module for class TranslatePipe in
/Users/rolandjitsu/Projects/infarm/operator/node_modules/ionic-angular/translation/translate_pipe.d.ts!
[21:56:53] ngc failed
[21:56:53] ionic-app-script task: "build"
[21:56:53] Error: Error
What behavior are you expecting?
It should build without errors.
Steps to reproduce:
- Run
ionic-app-scripts build
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Note that I am using "@angular/compiler-cli": "^2.1.2".
Which Ionic Version? 1.x or 2.x Ionic 2 RC.1
Your system information:
Cordova CLI: Not installed Ionic Framework Version: 2.0.0-rc.1 Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 ios-deploy version: Not installed ios-sim version: Not installed OS: Mac OS X El Capitan Node Version: v6.7.0 Xcode version: Xcode 8.1 Build version 8B62
Maybe you forgot to add your class to your app.module.ts or app.component.ts, i had the same issue
Same issue with version 2.4.8.
@jgw96 I have a couple of mocks in src/mocks/ionic/slides.mock.ts and it's causing the issue above. What do?
Hi Guys, I was suffering same issue like
Cannot determine the module for class OverlayPortal
Cannot determine the module for class ClickBlock
, etc. This does not happen in my dev build but in my stage and production build ONLY which I believe it is resulted by "--aot" in building path.
I figured out it is because some plugins, which are using those modules, are not compatible to newer ionic/angular/typescript. After using suggestions from @jgw96, I solve it by correcting each default versions as ionic team suggested, here is new link from ionic starter project.
From here on, when you are trying to upgrade dependencies or upgrade ionic platform, I would strongly recommended with starter project setting which should be most latest and compatible.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.