Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-zorro-antd-mobile build报错 #563

Closed
ccjhpu opened this issue Sep 4, 2019 · 10 comments
Closed

ng-zorro-antd-mobile build报错 #563

ccjhpu opened this issue Sep 4, 2019 · 10 comments
Assignees

Comments

@ccjhpu
Copy link

ccjhpu commented Sep 4, 2019

使用 npm run build -- --prod --aot, 报错,
"ng-zorro-antd-mobile": "^1.0.0-beta.1",
"@angular/cli": "8.3.2",

报错如下
ERROR in node_modules/ng-zorro-antd-mobile/ng-zorro-antd-mobile.d.ts.ListComponent.html(6,48): : Cannot invoke an expression whose type lacks a call signature. Type 'string | Function | TemplateRef<any>' has no compatible call signa tures. node_modules/ng-zorro-antd-mobile/ng-zorro-antd-mobile.d.ts.ListComponent.html(18,48): : Cannot invoke an expression whose type lacks a call signature. Type 'string | Function | TemplateRef<any>' has no compatible call signatures.

@fisherspy
Copy link
Collaborator

@ccjhpu 请问是如何复现的?

@ccjhpu
Copy link
Author

ccjhpu commented Sep 5, 2019

您好,我ng-zorro-antd-mobile的版本是1.0.0-beta.1,angular/cli 版本是 8.3.2,
本地 dev 模式完全正常,就是在 build模式报错,使用的命令是 npm run build:aot

@ccjhpu
Copy link
Author

ccjhpu commented Sep 5, 2019

@fisherspy 您好,我ng-zorro-antd-mobile的版本是1.0.0-beta.1,angular/cli 版本是 8.3.2,
本地 dev 模式完全正常,就是在 build模式报错,使用的命令是 npm run build:aot

@fisherspy
Copy link
Collaborator

@ccjhpu 你是build ng-zorro-antd-mobile组件库还是在你的项目里使用npm run build --aot, 能够在stackblitz提供代码demo

@ccjhpu
Copy link
Author

ccjhpu commented Sep 5, 2019

@fisherspy 是在项目里面使用npm run build --aot报错,但是使用npm run build可以编译通过,
项目里面同时集成了ng-zorro-antd(8.2.1)和ng-zorro-antd-mobile(1.0.0-beta.1),很抱歉啊项目是公司项目暂时不方便。

@bcddh
Copy link

bcddh commented Sep 5, 2019

@fisherspy
新建项目
@angular/core@8.2.4
@angular/cli@8.3.3
ng-zorro-antd-mobile@1.0.0-beta.1
编译命令 ng build --prod就会报这个错误。

@fisherspy
Copy link
Collaborator

@bcddh 有钉钉么?群里说一声,发个文件夹给我?

@fisherspy
Copy link
Collaborator

fisherspy commented Sep 5, 2019

通过 ng add ng-zorro-antd-mobile 会引发该问题,如果直接 npm install ng-zorro-antd-mobile --save不会出现该问题。原因在于采用schematics会在app module中依赖ng-zorro-antd-mobile module

@fisherspy
Copy link
Collaborator

@ccjhpu @bcddh 1.0.0-beta.2已修复

@ccjhpu
Copy link
Author

ccjhpu commented Sep 5, 2019

@fisherspy 真心感谢,我这边也可以啦,辛苦啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants