简体   繁体   中英

angularCompiler.getNextProgram is not a function, angular 12 & custom-webpack

I've just update my angular 11 project to 12.
I'm using @angular-builders/custom-webpack package in my devDependencies and using the following command to build my angular project.

ng build --configuration=production --build-optimizer --optimization

but after updating to angular 12, I'm getting 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]

I'm using the following package:

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

The problem was gone with installing version 12 of @angular-builders/custom-webpack
nowadays 12.0.0-beta.0

@angular-builders/custom-webpack@12.0.0-beta.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM