ERROR in无法读取未定义的属性'getSymbolByModule'

Wen*_*yan 10 angular

当我升级到Angular 4并运行ng服务时,我收到以下错误:

ERROR in Cannot read property 'getSymbolByModule' of undefined
Run Code Online (Sandbox Code Playgroud)

依赖关系按以下方式使用

  "dependencies": {
    "@angular/animations": "^4.0.2",
    "@angular/cli": "^1.0.0",
    "@angular/common": "^4.0.2",
    "@angular/compiler": "^4.0.2",
    "@angular/compiler-cli": "^2.4.10",
    "@angular/core": "^4.0.2",
    "@angular/forms": "^4.0.2",
    "@angular/http": "^4.0.2",
    "@angular/platform-browser": "^4.0.2",
    "@angular/platform-browser-dynamic": "^4.0.2",
    "@angular/platform-server": "^4.0.2",
    "@angular/router": "^4.0.2",
    "@types/jasmine": "^2.5.47",
    "angular2-flash-messages": "^1.0.8",
    "angular2-jwt": "^0.1.28",
    "codelyzer": "^2.1.1",
    "core-js": "^2.4.1",
    "jasmine-spec-reporter": "^2.7.0",
    "karma": "^1.6.0",
    "rxjs": "^5.3.0",
    "ts-helpers": "^1.1.2",
    "ts-node": "^1.7.3",
    "typescript": "^2.0.10",
    "zone.js": "^0.8.5"
  },
Run Code Online (Sandbox Code Playgroud)

这里有什么问题吗?

Mik*_*rts 21

您还需要将@ angular/compiler-cli更新到版本4.

"@angular/compiler-cli": "4.0.2",
Run Code Online (Sandbox Code Playgroud)


Gér*_*B-S 1

这似乎是一个与 相关的问题@angular/platform-browser@angular/platform-browser你的版本和你的版本有冲突@angular/cli。尝试将您的 Angular/cli 更新到最新版本。这里讨论了同样的问题