【问题标题】:Error in error: Metadata version mismatch for angular2-flash-messages错误错误:angular2-flash-messages 的元数据版本不匹配
【发布时间】:2017-12-31 16:40:49
【问题描述】:

我正在浏览YouTubeTraversy MediaMEAN 堆栈从前到后的播放列表 在导入 flash 消息后,console 给出了错误,我无法理解。我读过一些gitHub 问题页面,但它们没有任何结果。

ERROR in Error: Metadata version mismatch for module B:/Shall/Practice/meanauthapp/angular-src/node_modules/angular2-flash-messages/module/index.d.ts, found version 4, expected 3, resolving symbol AppModule in B:/Shall/Practice/meanauthapp/angular-src/src/app/app.module.ts, resolving symbol AppModule in B:/Shall/Practice/meanauthapp/angular-src/src/app/app.module.ts
at SyntaxError.BaseError [as constructor] (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler\bundles\compiler.umd.js:1597:31)
at new SyntaxError (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler\bundles\compiler.umd.js:1795:20)
at simplifyInContext (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler\bundles\compiler.umd.js:25774:27)
at StaticReflector.simplify (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler\bundles\compiler.umd.js:25786:17)
at StaticReflector.annotations (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler\bundles\compiler.umd.js:25282:64)
at _getNgModuleMetadata (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler-cli\src\ngtools_impl.js:126:31)
at _extractLazyRoutesFromStaticModule (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler-cli\src\ngtools_impl.js:101:26)
at Object.listLazyRoutesOfModule (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler-cli\src\ngtools_impl.js:52:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@angular\compiler-cli\src\ngtools_api.js:78:39)
at AotPlugin._getLazyRoutesFromNgtools (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@ngtools\webpack\src\plugin.js:241:66)
at _donePromise.Promise.resolve.then.then.then.then.then (B:\Shall\Practice\meanauthapp\angular-src\node_modules\@ngtools\webpack\src\plugin.js:495:24)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

我的package.json文件如下:

{
  "name": "angular-src",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@angular/animation": "^4.0.0-beta.8",
    "@angular/common": "^2.3.1",
    "@angular/compiler": "^2.3.1",
    "@angular/core": "^2.3.1",
    "@angular/forms": "^2.3.1",
    "@angular/http": "^2.3.1",
    "@angular/platform-browser": "^2.3.1",
    "@angular/platform-browser-dynamic": "^2.3.1",
    "@angular/router": "^3.3.1",
    "angular2-flash-messages": "^2.0.5",
    "core-js": "^2.4.1",
    "rxjs": "^5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^2.3.1",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.28.3",
    "codelyzer": "~2.0.0-beta.1",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "~4.0.13",
    "ts-node": "1.2.1",
    "tslint": "^4.3.0",
    "typescript": "~2.0.3"
  }
}

【问题讨论】:

  • 将问题标签从 angularjs 更改为 angular

标签: angular npm mean-stack flash-message


【解决方案1】:

如果这算不算, 但有人建议我做 npm install @angualr2-flash-messages@1.0.8

瞧!有效!请提出一些其他可能证明这一点的技术细节。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-04-03
    • 2018-05-22
    • 1970-01-01
    • 2011-03-07
    • 2018-04-19
    • 2019-04-29
    • 1970-01-01
    相关资源
    最近更新 更多