NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.87k stars 3.92k forks source link

8升级到9时报错 #5062

Closed yutao331763646 closed 4 years ago

yutao331763646 commented 4 years ago

Reproduction link

https://stackblitz.com/run

Steps to reproduce

删除node_modules; 从8升级到9; 因为是升级错误,所以无法提供复现;

What is expected?

正常编译

What is actually happening?

无法编译: ·······

1 export declare class NzStatisticModule {


node_modules/ng-zorro-antd/steps/steps.module.d.ts:8:22 - error NG6003: Appears in the NgModule.exports of NgZorroAntdModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.

This likely means that the library (ng-zorro-antd/steps) which declares NzStepsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check 
if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

····

| Environment | Info |
|---|---|
| ng-zorro-antd | 9.0.0 |
| Browser | Chrome  版本 78.0.3904.17(正式版本) (32 位) |

---
"private": true,
  "dependencies": {
    "@angular/animations": "~9.1.2",
    "@angular/common": "~9.1.2",
    "@angular/compiler": "~9.1.2",
    "@angular/core": "~9.1.2",
    "@angular/forms": "~9.1.2",
    "@angular/material": "^9.2.1",
    "@angular/platform-browser": "~9.1.2",
    "@angular/platform-browser-dynamic": "~9.1.2",
    "@angular/router": "~9.1.2",
    "@antv/data-set": "^0.11.4",
    "@antv/g2": "^4.0.6",
    "@antv/g6": "^3.2.8",
    "@delon/chart": "^8.6.0",
    "@delon/util": "^8.6.0",
    "@ngrx/store": "^9.1.0",
    "@ngx-translate/core": "^12.1.2",
    "@ngx-translate/http-loader": "^4.0.0",
    "classlist.js": "^1.1.20150312",
    "core-js": "^3.1.4",
    "crypto-js": "^4.0.0",
    "echarts": "^4.2.0-rc.2",
    "express": "^4.16.4",
    "fingerprintjs2": "^2.0.6",
    "js2wordcloud": "^1.1.12",
    "lodash": "^4.17.15",
    "mockjs": "^1.0.1-beta3",
    "moment": "^2.24.0",
    "ng-zorro-antd": "^9.0.1",
    "ngx-echarts": "^4.1.0",
    "ngx-progressbar": "^6.0.0",
    "numeral": "^2.0.6",
    "reflect-metadata": "^0.1.13",
    "rxjs": "~6.5.3",
    "rxjs-compat": "^6.3.3",
    "tslib": "^1.10.0",
    "viser-ng": "^2.5.0",
    "web-animations-js": "^2.3.1",
    "zone.js": "~0.10.2"
  },<!-- generated by ng-zorro-issue-helper. DO NOT REMOVE -->
zorro-bot[bot] commented 4 years ago

Translation of this issue:

8 to 9 upgrade error

Reproduction link

Https://stackblitz.com/run

Steps to reproduce

Delete node_modules; Upgrading from 8-9; Because the upgrade is wrong, so I can not provide reproducible;

What is expected?

Normal compilation

What is actually happening?

Not compile: ............

1 export declare class NzStatisticModule {                        ~~~~~ node_modules / ng-zorro-antd / steps / steps.module.d.ts: 8: 22 - error NG6003: Appears in the NgModule.exports of NgZorroAntdModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class .

This likely means that the library (ng-zorro-antd / steps) which declares NzStepsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

????

Environment Info
Ng-zorro-antd 9.0.0
Browser Chrome version 78.0.3904.17 (official version) (32)

"Private": true,   "Dependencies": {     "@ Angular / animations": "~ 9.1.2",     "@ Angular / common": "~ 9.1.2",     "@ Angular / compiler": "~ 9.1.2",     "@ Angular / core": "~ 9.1.2",     "@ Angular / forms": "~ 9.1.2",     "@ Angular / material": "^ 9.2.1",     "@ Angular / platform-browser": "~ 9.1.2",     "@ Angular / platform-browser-dynamic": "~ 9.1.2",     "@ Angular / router": "~ 9.1.2",     "@ Antv / data-set": "^ 0.11.4",     "@ Antv / g2": "^ 4.0.6",     "@ Antv / g6": "^ 3.2.8",     "@ Delon / chart": "^ 8.6.0",     "@ Delon / util": "^ 8.6.0",     "@ Ngrx / store": "^ 9.1.0",     "@ Ngx-translate / core": "^ 12.1.2",     "@ Ngx-translate / http-loader": "^ 4.0.0",     "Classlist.js": "^ 1.1.20150312",     "Core-js": "^ 3.1.4",     "Crypto-js": "^ 4.0.0",     "Echarts": "^ 4.2.0-rc.2",     "Express": "^ 4.16.4",     "Fingerprintjs2": "^ 2.0.6",     "Js2wordcloud": "^ 1.1.12",     "Lodash": "^ 4.17.15",     "Mockjs": "^ 1.0.1-beta3",     "Moment": "^ 2.24.0",     "Ng-zorro-antd": "^ 9.0.1",     "Ngx-echarts": "^ 4.1.0",     "Ngx-progressbar": "^ 6.0.0",     "Numeral": "^ 2.0.6",     "Reflect-metadata": "^ 0.1.13",     "Rxjs": "~ 6.5.3",     "Rxjs-compat": "^ 6.3.3",     "Tslib": "^ 1.10.0",     "Viser-ng": "^ 2.5.0",     "Web-animations-js": "^ 2.3.1",     "Zone.js": "~ 0.10.2"   },

vthinkxie commented 4 years ago

看了一下你的依赖列表,很多包都没有支持 ivy,比如 "@delon/chart": "^8.6.0", "@delon/util": "^8.6.0", 都是二次依赖 ng-zorro-antd 8.x 的版本的,非ivy与ivy版本的包不能同时在一个项目中工作,请联系对应的包作者寻找支持

yutao331763646 commented 4 years ago

看了一下你的依赖列表,很多包都没有支持 ivy,比如 "@delon/chart": "^8.6.0", "@delon/util": "^8.6.0", 都是二次依赖 ng-zorro-antd 8.x 的版本的,非ivy与ivy版本的包不能同时在一个项目中工作,请联系对应的包作者寻找支持

好吧,其实昨天尝试过删除这些,然后还是报错,估计是没清理完