0

I am trying to upgrade an angular app from 5.2 app to 11. It uses webpack to build and was not created using cli and has no angular.json file. I tried the 'upgrade angular' website to get instructions and also referred to the 'medium.com' instrutions and other stackoverflow questions and was not able to find an answer, could someone please help me with the steps to upgrade the app.

Mahdi Zarei
  • 5,644
  • 7
  • 24
  • 54
sps
  • 25
  • 7
  • For older versions it wouldn't have `angular.json`, but `angular-cli.json`. But I can't believe in Angular app generated without Angular CLI. – mbojko Apr 14 '21 at 11:52

3 Answers3

4

I suggest you:

  1. Create an empty Angular 11 application (generate one and remove all elements)
  2. Add the libraries you use in your old application with the newer versions
  3. Copy the files.
  4. Check all "rxjs" you use -Angular 11 use Rxjs6-. See RxJS v5.x to v6 Update Guide
  5. Check all the http calls to use the new httpClient
Eliseo
  • 50,109
  • 4
  • 29
  • 67
3

angular recommends to NOT TO upgrade more than 1 major updates at once. you have to upgrade step by step. 5 to 6, 6 to 7 and so on...

Mahdi Zarei
  • 5,644
  • 7
  • 24
  • 54
  • 1
    Agreed but this can become a tedious activity. – sps Apr 15 '21 at 09:03
  • Yes it is, unfortunately this is the only solution. And also there is a high possibility for causing some serious bugs in this scope of changes. This is why some teams put this idea aside and decide to rewrite the entire project. @sps – Mahdi Zarei Apr 16 '21 at 16:23
  • Oh, that makes sense – sps Apr 19 '21 at 08:39
3

You can use update guide and check step by step.

https://update.angular.io/?v=5.2-11.0

Piva Gregory
  • 442
  • 2
  • 13