Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
angularCompiler.getNextProgram不是函数,angular 12&;自定义网页包_Angular_Webpack_Angular12 - Fatal编程技术网

angularCompiler.getNextProgram不是函数,angular 12&;自定义网页包

angularCompiler.getNextProgram不是函数,angular 12&;自定义网页包,angular,webpack,angular12,Angular,Webpack,Angular12,我刚刚将angular 11项目更新为12。 我在我的devDependencies中使用@angular builders/custom webpack包,并使用以下命令来构建我的angular项目 ng build --configuration=production --build-optimizer --optimization 但在更新到angular 12后,我得到以下错误: Error: ./src/main.ts Module build failed (from ./node

我刚刚将angular 11项目更新为12。
我在我的
devDependencies
中使用
@angular builders/custom webpack
包,并使用以下命令来构建我的angular项目

ng build --configuration=production --build-optimizer --optimization
但在更新到angular 12后,我得到以下错误:

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]
我正在使用以下软件包:

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

安装
@angular builders/custom webpack

如今
12.0.0-beta.0

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

您的问题应该通过采取问题中概述的行动来解决。确保
@angular devkit/build angular
版本正确。在我的例子中,我从devdependences中删除了
webpack
,而是安装了
webpack cli
。有关详细讨论,请参阅帖子。