1

I have this angular and ionic project, the code is Here on GitHub. When I try to do a production build, with "ionic build --prod" I get this error message:

    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 (C:\Users\marti\OneDrive\Dokumenter\dt\Inventar\node_modules\@ngtools\webpack\src\ivy\plugin.js:261:56)
    at C:\Users\marti\OneDrive\Dokumenter\dt\Inventar\node_modules\@ngtools\webpack\src\ivy\plugin.js:374:20
    at analyzingFileEmitter (C:\Users\marti\OneDrive\Dokumenter\dt\Inventar\node_modules\@ngtools\webpack\src\ivy\plugin.js:307:20)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
 @ 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 (C:\Users\marti\OneDrive\Dokumenter\dt\Inventar\node_modules\@ngtools\webpack\src\ivy\plugin.js:261:56)
    at C:\Users\marti\OneDrive\Dokumenter\dt\Inventar\node_modules\@ngtools\webpack\src\ivy\plugin.js:374:20
    at analyzingFileEmitter (C:\Users\marti\OneDrive\Dokumenter\dt\Inventar\node_modules\@ngtools\webpack\src\ivy\plugin.js:307:20)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
 @ multi ./node_modules/@angular-devkit/build-angular/src/webpack/es5-polyfills.js zone.js/dist/zone-legacy ./src/polyfills.ts polyfills-es5[2]
 

I have tried to run an "npm audit fix" to see if its some weird dependency issue, but that at least didn't solve it or find anything. It also works fine when doing a non-prod build. I also tried reverting to a previous commit where I know it worked but it no longer does, so I have no idea what's going on and would appreciate some help.

Martin
  • 65
  • 7

0 Answers0