我创建了一个 Angular 7 项目。在我的项目中添加了Ng-zorro 。使用 ng serve 进行开发时,一切都运行良好。我使用以下命令添加了 serviceworker:
ng add @angular/pwa
在我的 tsconfig 文件中,我添加了以下行:
"angularCompilerOptions": {
"enableIvy": true
}
使用 ng serve 或 npm start 时一切正常。但是当我尝试 ng build --prod 它给出了以下错误:
ERROR in : Template parse errors:
The pipe 'nzI18n' could not be found ("down-menu-item ant-select-dropdown-menu-item-disabled">
{{ nzNotFoundContent ? nzNotFoundContent[ERROR ->] : ('Select.notFoundContent' | nzI18n) }}
</li>
<li
"): /Volumes/Zotac 120GB/6sense/Projects/ngx-boilerplate/node_modules/ng-zorro-antd/ng-zorro-antd.d.ts.ɵbo.html@11:44
The pipe 'nzFilterOptionPipe' could not be found ("
[nzMode]="nzMode"
[compareWith]="compareWith"
*ngFor="let op[ERROR ->]tion of listOfNzOptionComponent | nzFilterOptionPipe : nzSearchValue : nzFilterOption : nzServerSearc"): /Volumes/Zotac 120GB/6sense/Projects/ngx-boilerplate/node_modules/ng-zorro-antd/ng-zorro-antd.d.ts.ɵbo.html@24:18
The pipe 'nzSubFilterOptionPipe' could not be found ("
</li>
<li
*ngFor="let g[ERROR ->]roup of listOfNzOptionGroupComponent | nzSubFilterOptionPipe : nzSearchValue : nzFilterOption : nzSer"): /Volumes/Zotac 120GB/6sense/Projects/ngx-boilerplate/node_modules/ng-zorro-antd/ng-zorro-antd.d.ts.ɵbo.html@31:17
The pipe 'nzFilterOptionPipe' could not be found ("
[nzMode]="nzMode"
[compareWith]="compareWith"
*ngFor="let op[ERROR ->]tion of group.listOfNzOptionComponent | nzFilterOptionPipe : nzSearchValue : nzFilterOption : nzServe"): /Volumes/Zotac 120GB/6sense/Projects/ngx-boilerplate/node_modules/ng-zorro-antd/ng-zorro-antd.d.ts.ɵbo.html@46:22
The pipe 'nzFilterOptionPipe' could not be found ("
[nzMode]="nzMode"
[compareWith]="compareWith"
*ngFor="let op[ERROR ->]tion of listOfTagOption | nzFilterOptionPipe : nzSearchValue : nzFilterOption : nzServerSearch "
"): /Volumes/Zotac 120GB/6sense/Projects/ngx-boilerplate/node_modules/ng-zorro-antd/ng-zorro-antd.d.ts.ɵbo.html@59:18