samples-js-angular icon indicating copy to clipboard operation
samples-js-angular copied to clipboard

Update angular to v15

Open cavazosjoe opened this issue 1 year ago • 1 comments

Also update misc dependencies.

Console output of v15 upgrade:

** Executing migrations of package '@angular/cli' **

> Remove Browserslist configuration files that matches the Angular CLI default configuration.
DELETE .browserslistrc
  Migration completed (1 file modified).

> Remove exported `@angular/platform-server` `renderModule` method.
  The `renderModule` method is now exported by the Angular CLI.
  Migration completed (No changes made).

> Remove no longer needed require calls in Karma builder main file.
  Migration completed (No changes made).

> Update TypeScript compiler `target` and set `useDefineForClassFields`.
  These changes are for IDE purposes as TypeScript compiler options `target` and `useDefineForClassFields` are set to `ES2022` and `false` respectively by the Angular CLI.
  To control ECMA version and features use the Browerslist configuration.
UPDATE tsconfig.json (852 bytes)
  Migration completed (1 file modified).

> Remove options from 'angular.json' that are no longer supported by the official builders.
  Migration completed (No changes made).

** Executing migrations of package '@angular/core' **

> In Angular version 15, the deprecated `relativeLinkResolution` config parameter of the Router is removed.
  This migration removes all `relativeLinkResolution` fields from the Router config objects.
UPDATE src/app/app.module.ts (3414 bytes)
  Migration completed (1 file modified).

> Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive.
  This migration replaces all `RouterLinkWithHref` references with `RouterLink`.
  Migration completed (No changes made).

cavazosjoe avatar Nov 01 '24 02:11 cavazosjoe

Trying to update to v16 result in an error, most likely caused by the @giomamaladze/ng2-semantic-ui library. This library apparently has no update or easy replacement.

Error: src/app/app.module.ts:70:5 - error NG6002: 'SuiModalModule' does not appear to be an NgModule class.

70     SuiModalModule,
       ~~~~~~~~~~~~~~

  node_modules/@giomamaladze/ng2-semantic-ui/modules/modal/modal.module.d.ts:1:22
    1 export declare class SuiModalModule {
                           ~~~~~~~~~~~~~~
    This likely means that the library (@giomamaladze/ng2-semantic-ui) which declares SuiModalModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.   


Error: src/app/app.module.ts:101:3 - error TS2345: Argument of type '{ declarations: (typeof AppComponent | typeof HomeComponent | typeof MessagesComponent | typ
eof ProfileComponent | typeof ConfirmModalComponent)[]; imports: (typeof BrowserModule | ... 1 more ... | typeof SuiModalModule)[]; providers: ({ ...; } | { ...; })[]; bootstrap: (typeof AppComponent)[]; entryComponents: (typ...' is not assignable to parameter of type 'NgModule'.
  Object literal may only specify known properties, and 'entryComponents' does not exist in type 'NgModule'.

101   entryComponents: [ConfirmModalComponent],
      ~~~~~~~~~~~~~~~

cavazosjoe avatar Nov 01 '24 02:11 cavazosjoe