Skip to content

Instantly share code, notes, and snippets.

@georgiee georgiee/_rc5.md
Last active Apr 24, 2018

Embed
What would you like to do?
Angular Upgrade Log v6
npm install -g @angular/cli@next
npm install @angular/cli@next
ng update @angular/cli --from=1 --migrate-only
ng update @angular/core@next --force
ng update @angular/cdk@next

Now with rc5: (Mono repository with app & library)

Problems

  • First AOT build (app, consuming the library from TS sources)fails in the end: Error: Expected to find an ngsw-config.json configuration file in the ab/cd folder. Either provide one or disable Service Worker in your angular.json configuration file. -> disabled service worker in angular.json and AOT build works. Have to investigate. The file is present but in another folder.

  • Second AOT build (app, consuming the library from TS sources) Works 👌

  • At some random places CSS spacing is off after applying your list of commands. Have to investigate.

  • During ng-packagr build of the library (ng-packagr, v3-rc3) We are calling complete method of the EventEmitter class from angular/core and during the packaging we get error TS2339: Property 'complete' does not exist on type 'EventEmitter'. Guess this is ng-packagr related. -> Tried ts-node upgrade 4 to 5 -> Tried to provide lib.languageLevel (["es2017","dom"]) for ng-packagr.

  • We use ng set/get at some places to switch the tsconfig configuration. Don't know how to replace them yet. Maybe tsconfig can now be override with the new architect

  • angular.json was created with app and app1 and caused the following error: Architect commands with multiple targets cannot specify overrides.'build' would be run on the following projects: app, app1 I just removed the app1 completely. Reasons is maybe a very small config still in the angular-cli.json we had there in place to support ng generate inside our nested library project. Can be ignored I guess.

npm install -g @angular/cli@next
npm install @angular/cli@next
ng update @angular/cli --from=1 --migrate-only
ng update @angular/core@next --force
ng update @angular/cdk@next

I gave 6.0.0-rc.4 a try, had some problems with private packages, service worker/ngsw-config.json,

General things to consider

  1. Private packages issues https://github.com/angular/angular-cli/issues/10167 Removed "@scope/styles": "1.2.3" temporarly

  2. RXJS Upgrade guide https://goo.gl/osWFzo or use rxjs-compat

Problems

  1. Directive _stepHeader in progress component

  2. popover: remvoe complete form event emitter (althouh its valid on subject there was error it's not there)

  3. Error: Architect commands with multiple targets cannot specify overrides.'build' would be run on the following projects: app,app1

  4. Error: Expected to find an ngsw-config.json configuration file in the ab/cd folder. Either provide one or disable Service Worker in your angular.json configuration file.

  5. Many errors from rxjs file (which was unused)

  6. Popover tests failing. Becuase Popover Strategy changed. Move over to CDK: PopoFlexibleConnectedPositionStrategy. See menu-trigger.ts for a how to. -> disabled tests, migration to Flexible Strategy postponed

  7. NxSingleStepperComponent fails at many places TypeError: Cannot read property 'changes' of undefined at FocusKeyManager.ListKeyManager node_modules/@angular/cdk/esm5/a11y.es5.js:419:1) @ViewChildren(HTMLElement) _stepHeader: QueryList; Do we really need to keep the header here? It's unused. check: src/lib/stepper/stepper.ts --> fixed with defualt INIT

  8. disabled service worker to get assets loaded properly again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.