Ng-zorro-antd: 按照官方的快速开始,编译出错

Created on 16 Aug 2017  ·  26Comments  ·  Source: NG-ZORRO/ng-zorro-antd

在执行ng serve --port 0 --open,报错
b5a6098b-6291-4dc5-93fb-33ae0c79547c

Bug

Most helpful comment

image

Agree this is a bug, @angular/***s shouldn't be made into dependencies, it would cause sub dependencies being installed when version not being the same.

EDIT: May not relevant, since I'm using Angular 5.0 version.

All 26 comments

try to update cli to the latest version, rm -rf node_modules, and retry again

the angular/cli and the ng-zorro-antd were the latest version

image

Agree this is a bug, @angular/***s shouldn't be made into dependencies, it would cause sub dependencies being installed when version not being the same.

EDIT: May not relevant, since I'm using Angular 5.0 version.

Agree with @trotyl , may it's time to remove dependencies that not privately needs

@yiranlee

  1. Could you please provide more information about your local dev environment ?
  2. Did you encounter with any errors or warnings while npm install ng-zorro-antd ?

ng-zero

类似的问题,反馈一下。在 angular 4.2.3 和 cli 版本 1.2.7 编译出错,之后 cli 升级到 1.3.0 还是同样的问题。最后升级 angular 至最新版本 4.3.4 编译成功。

@yiranlee
rm -rf node_modules and reinstall may be a temporary solution, have a try please, thanks for feedback.

@wilsoncook
1.my local dev environment in below pic
2017-08-16 11 52 58
2017-08-16 11 54 08

  1. no errors when i install angular/cli and the ng-zorro-antd

it sames that our project angular dependeces version does't suit with ng-zorro-antd

@yiranlee Could you please take a snapshot of under the node_modules/ng-zorro-antd/node_modules folder ?
OR rm -rf node_modules and re-install is another temporary solution if emergency.

@wilsoncook
2017-08-16 1 35 09

Hmmmm. in china please use cnpm!!

It could be confirmed as version conflict of angular and related, i am about to fix the specs of dependencies. @vthinkxie

我也是这个错误,怎么解决的?

@liuliangjia Please remove node_modules (rm -rf node_modules), then re-install all node modules (npm install) if emergency

I have a similar problem, upgrade angular to 4.3.4 can resolve this problem

只要是用cnpm重装就有可能出错,最后用npm install ,同时升到4.3.4就没问题了。

先把NgZorroAntdModule.forRoot()从app.module移除,把项目正常跑起来以后,再引入它,热更新就可以跑起来。很神奇的赶脚。

@wilsoncook 出错的问题,什么时候会发布新版本进行修复呢

@litttlefisher rm -rf node_modules and reinstall will solve this problem.

@vthinkxie 不知道为什么,删除了node_modules目录后重新cnpm install还是会报错,而且报错内容没有变化。难道跟window平台有关吗?全局环境中没有ng-zorro-antd

@litttlefisher It's about to be fixed in next version

@wilsoncook 所以我想了解下,下个版本什么时候上,每天来github检查一下毕竟比较麻烦

@litttlefisher we will release next version tomorrow, thanks

@vthinkxie @wilsoncook 谢谢两位大神,坐等明天修复后,开始玩ng-zorro-antd

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings