鍍金池/ 問答/網(wǎng)絡(luò)安全/ no-zorro webpack prod打包報錯

no-zorro webpack prod打包報錯

使用webpack打prod包的時候報錯,但打dev包的時候正常,報錯信息如下:

ERROR in node_modules\ng-zorro-antd\antd.d.ts.傻p.html(1,1442): : Expected 1 arguments, but got 3.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻bh.html(1,665): : Argument of type 'QueryList<NzOptionComponent>' is not assignable to parameter of type 'NzOptionComponent[]'.
[INFO]   Property 'includes' is missing in type 'QueryList<NzOptionComponent>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻bh.html(1,934): : Argument of type 'QueryList<NzOptionGroupComponent>' is not assignable to parameter of type 'NzOptionGroupComponent[]'.
[INFO]   Property 'includes' is missing in type 'QueryList<NzOptionGroupComponent>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻cd.html(1,188): : Property 'activeIndex' is private and only accessible within class 'NzMentionComponent'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻eg.html(1,938): : Expected 0 arguments, but got 1.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻ew.html(1,250): : Property 'isTitleString' is private and only accessible within class 'NzCardMetaComponent'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻ew.html(1,505): : Property 'isDescriptionString' is private and only accessible within class 'NzCardMetaComponent'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gs.html(1,1597): : Argument of type 'CompatibleValue' is not assignable to parameter of type 'CandyDate[]'.
[INFO]   Type 'CandyDate' is not assignable to type 'CandyDate[]'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,864): : Property 'nzAddOn' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,750): : Property 'nzHideDisabledOptions' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,810): : Property 'nzDefaultOpenValue' does not exist on type 'object'.
[ERROR] error Command failed with exit code 2.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,598): : Property 'nzDisabledHours' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,646): : Property 'nzDisabledMinutes' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,698): : Property 'nzDisabledSeconds' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,444): : Property 'nzFormat' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,476): : Property 'nzHourStep' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,514): : Property 'nzMinuteStep' does not exist on type 'object'.
[ERROR] error Command failed with exit code 1.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻gm.html(1,556): : Property 'nzSecondStep' does not exist on type 'object'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻hi.html(1,582): : Property 'span' does not exist on type 'NzListGrid'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,754): : Expected 0 arguments, but got 1.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,754): : Property 'onClickCloseBtn' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,1460): : Property 'isTemplateRef' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,1558): : Property 'isNonEmptyString' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,1841): : Property 'isTemplateRef' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,1943): : Property 'isNonEmptyString' is private and only accessible within class 'NzModalComponent<T, R>'.
[ERROR] error Command failed with exit code 1.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2647): : Property 'getButtonCallableProp' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2597): : Property 'getButtonCallableProp' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2702): : Property 'getButtonCallableProp' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2565): : Property 'onButtonClick' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2976): : Property 'onClickOkCancel' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,3132): : Property 'onClickOkCancel' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2266): : Property 'isTemplateRef' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2366): : Property 'isNonEmptyString' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,2473): : Property 'isModalButtons' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,1776): : Property 'isComponent' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,4000): : Property 'isTemplateRef' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,4102): : Property 'isNonEmptyString' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,4405): : Property 'onClickOkCancel' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,4580): : Property 'onClickOkCancel' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,3642): : Property 'isTemplateRef' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,3740): : Property 'isNonEmptyString' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻iv.html(1,3935): : Property 'isComponent' is private and only accessible within class 'NzModalComponent<T, R>'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻jd.html(1,249): : Property 'nzShowSearch' does not exist on type 'NzCascaderComponent'.
[INFO] node_modules\ng-zorro-antd\antd.d.ts.傻jj.html(1,240): : Expected 1 arguments, but got 2.
回答
編輯回答
誮惜顏

同問?解決了碼?

2018年1月11日 19:33
編輯回答
愛礙唉

搞不定啊。有沒有人幫忙???
我用的是jhipster的腳手架工具生成的項目,然后集成nz-zorro1.2.0,打包就直接報這個錯了。
https://www.jhipster.tech/

2017年3月2日 17:43
編輯回答
萌吟

解決了嗎?我也遇到了相同的問題,用的也是jhipster。如果解決了還望告知一下

2017年2月28日 05:11
編輯回答
淺淺

這報錯信息寫的一清二白的啊,挨個改了不就好了

dev 環(huán)境下打包好用那是因為 tsconfig.json 沒有開啟一些嚴格校驗的配置,而 prod 會開啟。

2018年6月5日 10:15