angular 7生产构建失败
我创建了一个angular 7项目。添加到我的项目中。使用ng serve进行开发时,一切都很好。我使用以下命令添加了serviceworker:angular 7生产构建失败,angular,angular7,angular-service-worker,ng-zorro-antd,Angular,Angular7,Angular Service Worker,Ng Zorro Antd,我创建了一个angular 7项目。添加到我的项目中。使用ng serve进行开发时,一切都很好。我使用以下命令添加了serviceworker: ng add @angular/pwa 在我的tsconfig文件中,我添加了以下行: "angularCompilerOptions": { "enableIvy": true } 使用ng serve或npm start时,一切正常。但是当我尝试ng build--prod时,它会给出以下错误: ERROR in : Template
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
中的错误:模板分析错误:
找不到管道“nzI18n”(“下拉菜单项ant select下拉菜单项已禁用”>
{{nzNotFoundContent?nzNotFoundContent[ERROR->]:('Select.notFoundContent'| nzI18n)}
]ListOfNzOptionGroup组件组| nzSubFilterOptionPipe:nzSearchValue:nzFilterOption:nzSer”):/Volumes/Zotac 120GB/6sense/Projects/ngx样板/节点模块/ng zorro antd/ng zorro antd.d.ts.ɵbo。html@31:17
找不到管道“nzFilterOptionPipe”(“
[nzMode]=“nzMode”
[compareWith]=“compareWith”
*ngFor=“let op[ERROR->]group.listOfNzOptionComponent的选项| nzFilterOptionPipe:nzSearchValue:nzFilterOption:nzServe”):/Volumes/Zotac 120GB/6sense/Projects/ngx样板文件/节点模块/ng zorro antd/ng zorro antd.d.ts.ɵbo。html@46:22
找不到管道“nzFilterOptionPipe”(“
[nzMode]=“nzMode”
[compareWith]=“compareWith”
*ngFor=“let op[ERROR->]listOfTagOption的选项| nzFilterOptionPipe:nzSearchValue:nzFilterOption:nzServerSearch”
“”:/Volumes/Zotac 120GB/6sense/Projects/ngx样板文件/node_模块/ng zorro antd/ng zorro antd.d.ts.ɵbo。html@59:18
lib版本有问题,请尝试降级您的库是否导入了管道模块
在哪里导入ng zorro主模块?在app.module中还是延迟加载的模块?如果是延迟加载的模块,则可能发生此错误