我创建了一个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
PipesModule
吗? - Sachila Ranawaka