Upgrade NX Application to Angular 19
This guide describes how to upgrade an NX-based OneCX application to Angular 19. Complete the pre-migration steps from the main migration guide before you continue.
Update @onecx/nx-plugin
Update @onecx/nx-plugin to latest 6.x.y available.
npm install @onecx/nx-plugin@^6
Update NX Packages
Update the Angular and NX packages in your workspace by running:
nx migrate 20.4.0 --interactive
This command prompts you to apply updates for each major version of Angular and TypeScript. Apply all proposed updates up to Angular 19.1 and TypeScript 5.7.
For details on NX / Angular compatibility, refer to the Angular NX Version Matrix.
For details on nx migrate, refer to the official documentation: NX Migrate Documentation.
Update Package Versions in package.json
-
After running the migration command, update the remaining packages manually. Update all
@onecx/*packages to latest available6.x.yversion.Example:npm install @onecx/<package-name>@^6 -
Update the packages listed here to the specified versions: Required Package Updates.
-
The following packages should be removed:
-
@onecx/keycloak-auth- Follow the instructions in Remove @onecx/keycloak-auth to update your application accordingly. -
@onecx/portal-layout-styles -
@onecx/portal-integration-angular
-
-
After updating
package.json, runnpm installto install the new versions. If you see peer dependency errors, update the affected packages to compatible versions.
|
If you still see dependency conflicts that reference old versions, reinstall dependencies from scratch:
|
|
Make sure to migrate the updated packages and resolve any breaking changes. Refer to the official documentation of each package for migration guides and instructions. |