Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR in Cannot read property 'getSymbolByModule' of undefined

Tags:

angular

When I upgrade to Angular 4 and run ng serve, I got the following error:

ERROR in Cannot read property 'getSymbolByModule' of undefined

The dependencies are used as per following

  "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"
  },

Is there something wrong here?

like image 558
Wenyan Avatar asked Apr 19 '17 12:04

Wenyan


Video Answer


2 Answers

You need to update @angular/compiler-cli to version 4 as well.

"@angular/compiler-cli": "4.0.2",
like image 108
Mike Roberts Avatar answered Oct 17 '22 16:10

Mike Roberts


This seems to be an issue relative to @angular/platform-browser. There is a conflict between your @angular/platform-browser and your @angular/cli version. Try to update your angular/cli to latest. Same issue was discussed here

like image 27
Géraud Willing B-S Avatar answered Oct 17 '22 16:10

Géraud Willing B-S