Angular-builders: angularCompiler.getNextProgram is not a function

Created on 14 May 2021  路  5Comments  路  Source: just-jeb/angular-builders

Lately angular 12 is released, I'm using following command to optimize my project:
ng build --configuration=production --build-optimizer --optimization --progress
but I get the following error:

Error: ./src/main.ts
Module build failed (from ./node_modules/@angular-builders/custom-webpack/node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js):
TypeError: angularCompiler.getNextProgram is not a function
    at D:\Sources\******\Apps\******-Angular\node_modules\@angular-builders\custom-webpack\node_modules\@angular-devkit\build-angular\node_modules\@ngtools\webpack\src\ivy\plugin.js:390:61
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
 @ multi ./src/main.ts main[0]
not-an-issue

Most helpful comment

Angular and @angular-builders major versions should match. If you're using Angular 12 you're welcome to check out the 12.0.0-beta.0 version of the builder that has been released yesterday.

All 5 comments

Version of builder you're using?

Im' using the following package:

"@angular-builders/custom-webpack": "^11.1.1"

Angular and @angular-builders major versions should match. If you're using Angular 12 you're welcome to check out the 12.0.0-beta.0 version of the builder that has been released yesterday.

When will this release exit beta? I can verify that it works on our project and resolved all errors in the upgrading of our complex, hybrid AngularJS - Angular app

Seems that the for now all the arising issues are related to Webpack itself and not to the builder so I can actually release it.

Was this page helpful?
0 / 5 - 0 ratings