Ng-zorro-antd: ERROR in Error: Metadata version mismatch for module 。。。/node_modules/ng-zorro-antd/index.d.ts, found version 4, expected 3, resolving symbol AppModule

Created on 21 Nov 2017  ·  3Comments  ·  Source: NG-ZORRO/ng-zorro-antd

Version

0.6.0

Environment

mac-pro , chrome, "ng-zorro-antd": "^0.6.0",

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-setup?file=app%2Fapp.component.html

Steps to reproduce

"dependencies": {
"@angular/animations": "^4.2.4",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"core-js": "^2.4.1",
"ng-zorro-antd": "^0.6.0",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.4.9",
"@angular/compiler-cli": "^4.2.4",
"@angular/language-service": "^4.2.4",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.3.3"
}

运行 ng server 报错

What is expected?

运行 ng server 不报错

What is actually happening?

ERROR in Error: Metadata version mismatch for module /Users/jerry/project/huimei/git/goods/angular-app/node_modules/ng-zorro-antd/index.d.ts, found version 4, expected 3, resolving symbol AppModule in /Users/jerry/project/huimei/git/goods/angular-app/src/app/app.module.ts, resolving symbol AppModule in /Users/jerry/project/huimei/git/goods/angular-app/src/app/app.module.ts, resolving symbol AppModule in /Users/jerry/project/huimei/git/goods/angular-app/src/app/app.module.ts
at syntaxError (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
at simplifyInContext (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
at StaticReflector.simplify (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
at StaticReflector.annotations (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
at _getNgModuleMetadata (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
at _extractLazyRoutesFromStaticModule (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
at Object.listLazyRoutesOfModule (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@ngtools/webpack/src/plugin.js:212:44)
at _donePromise.Promise.resolve.then.then.then.then.then (/Users/jerry/project/huimei/git/goods/angular-app/node_modules/@ngtools/webpack/src/plugin.js:448:24)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

webpack: Failed to compile.

Other?

"ng-zorro-antd": "^0.5.5" 换成这个版本不报错

Most helpful comment

Thank you ~! 换成 angular 最新版本5.0.2好用了

All 3 comments

2017-11-21 11 19 10

Thank you ~! 换成 angular 最新版本5.0.2好用了

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