Moodle for mobile

The Angular AoT build failed.

Picture of Mohit juyal
The Angular AoT build failed.

We are facing an issue with the new source code (V3.5.0), we see the following error message post compilation of source code.

$ sudo ionic cordova run android --prod


> npm run ionic:build:before

> moodlemobile@3.5.0 ionic:build:before /Users//Desktop/moodlemobile

> gulp


Using gulpfile ~/Desktop/moodlemobile/gulpfile.js


Starting 'lang'...


Starting 'config'...

[16:52:25] Finished 'config' after 2.89 s


Finished 'lang' after 3.13 s

[16:52:25] Starting 'default'...


Finished 'default' after 28 μs

Running app-scripts build: --prod --platform android --target cordova

[16:52:28]  build prod started ... 

[16:52:28]  clean started ... 

[16:52:28]  clean finished in 23 ms 

[16:52:28]  copy started ... 

[16:52:28]  copy finished in 606 ms 

[16:52:28]  deeplinks started ... 

[16:52:30]  deeplinks finished in 1.77 s 

[16:52:30]  ngc started ... 

[16:53:01]  typescript error 

            Cannot determine the module for class CoreSitePluginsWorkshopAssessmentStrategyComponent in 


            Add CoreSitePluginsWorkshopAssessmentStrategyComponent to the NgModule to fix it. 

Error: The Angular AoT build failed. See the issues above

    at /Users//Desktop/moodlemobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55

    at step (/Users//Desktop/moodlemobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)

    at (/Users//Desktop/moodlemobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)

    at fulfilled (/Users//Desktop/moodlemobile/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)

Please assist.


Average of ratings: -
Picture of Dani Palou
Re: The Angular AoT build failed.
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi Mohit,

sorry for the delay in answering, it's been some crazy months lately.

The error you're describing was fixed already. However, in order to make external plugins and database work with AOT you need to modify a couple of things in ionic and angular. I'll add the instructions to the guide during today:



Average of ratings: -