Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
394 views
in Technique[技术] by (71.8m points)

angular - Ionic production build module build fail webpack

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:UsersmartiOneDriveDokumenterdtInventar
[email protected]:261:56)
    at C:UsersmartiOneDriveDokumenterdtInventar
[email protected]:374:20
    at analyzingFileEmitter (C:UsersmartiOneDriveDokumenterdtInventar
[email protected]: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:UsersmartiOneDriveDokumenterdtInventar
[email protected]:261:56)
    at C:UsersmartiOneDriveDokumenterdtInventar
[email protected]:374:20
    at analyzingFileEmitter (C:UsersmartiOneDriveDokumenterdtInventar
[email protected]: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.

question from:https://stackoverflow.com/questions/65872401/ionic-production-build-module-build-fail-webpack

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...