Hello, when using the command
ionic capacitor build android
works correctly for me. The problem happens when I use the command with the --prod flag
ionic capacitor build android --prod
I throw this error:
ā Browser application bundle generation complete.
Error: ./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
TypeError: angularCompiler.getResourceDependencies(...) is not a function or its return value is not iterable
at getDependencies (/home/kevin/proyectos/photo-gallery/node_modules/@ngtools/webpack/src/ivy/plugin.js:261:56)
at /home/kevin/proyectos/photo-gallery/node_modules/@ngtools/webpack/src/ivy/plugin.js:374:20
at analyzingFileEmitter (/home/kevin/proyectos/photo-gallery/node_modules/@ngtools/webpack/src/ivy/plugin.js:307:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
@ multi ./src/main.ts main[0]
Error: ./src/polyfills.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
TypeError: angularCompiler.getResourceDependencies(...) is not a function or its return value is not iterable
at getDependencies (/home/kevin/proyectos/photo-gallery/node_modules/@ngtools/webpack/src/ivy/plugin.js:261:56)
at /home/kevin/proyectos/photo-gallery/node_modules/@ngtools/webpack/src/ivy/plugin.js:374:20
at analyzingFileEmitter (/home/kevin/proyectos/photo-gallery/node_modules/@ngtools/webpack/src/ivy/plugin.js:307:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
@ multi ./node_modules/@angular-devkit/build-angular/src/webpack/es5-polyfills.js zone.js/dist/zone-legacy ./src/polyfills.ts polyfills-es5[2]