0

Is there a nice way to downgrade Angular version? My package.json looks like:

  "dependencies": {
    "@angular/animations": "^4.0.0",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "rxjs": "^5.4.1",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.2.6",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/language-service": "^4.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.0.1",
    "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.0.4",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }

So it took the latest version of Angular - I think v.5 and it throws strange errors like:

http://localhost:8091/main.(..).bundle.js net::ERR_ABORTED

so therefor I would like to set my Angular version in project to v.4.3.3 if possible? Or perhaps there is a nice workaround to above errors?

Jan Testowy
  • 649
  • 3
  • 13
  • 32

1 Answers1

1
rm -rf node_modules
npm install
andriyze
  • 464
  • 3
  • 7
  • you can add some description – Aniruddha Das Nov 10 '17 at 00:01
  • simply changing version in package.json is not enough. As all packages are being download to node_modules folder the most clean way is to remove that folder (rm -rf on linux/mac) and run 'npm install' command to download all again. – andriyze Nov 10 '17 at 16:30