Nx migration 19.0.8 --> 19.1.1
Current Behavior
Nx migration 19.0.8 --> 19.1.1 yields to package.json with library incompatibilities.
Expected Behavior
Move to Nx version 19.1.1
GitHub Repo
No response
Steps to Reproduce
- I am currently on Nx v19.0.8
- Execute command
npx nx migrate 19.1.1 - This creates the expected migration.json file and updates package.json
- Delete node_modules folder
- Delete package-lock.json file
- Execute
npm cache clean -f - Then execute
npm installand that breaks due to ngrx and angular libraries incompatibility.### Nx Report
Current Nx version 19.0.8 here is my nx report
NX Report complete - copy this into the issue template
Node : 22.16.0
OS : win32-x64
npm : 10.9.2
nx : 19.0.8
@nx/js : 19.0.8
@nx/jest : 19.0.8
@nx/linter : 19.0.8
@nx/eslint : 19.0.8
@nx/workspace : 19.0.8
@nx/angular : 19.0.8
@nx/cypress : 19.0.8
@nx/devkit : 19.0.8
@nx/eslint-plugin : 19.0.8
@nrwl/tao : 19.0.8
@nx/web : 19.0.8
@nx/webpack : 19.0.8
typescript : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin
@nx/cypress/plugin
---------------------------------------
Community plugins:
@ngrx/effects : 17.1.0
@ngrx/entity : 17.1.0
@ngrx/router-store : 17.1.0
@ngrx/schematics : 17.1.0
@ngrx/store : 17.1.0
@ngrx/store-devtools : 17.1.0
devextreme-angular : 24.1.4
eslint-plugin-ngrx : 2.1.4
Failure Logs
Sometimes i get this error
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @bi/[email protected]
npm error Found: @angular-devkit/[email protected]
npm error node_modules/@angular-devkit/build-angular
npm error dev @angular-devkit/build-angular@"18.0.7" from the root project
npm error peer @angular-devkit/build-angular@">= 15.0.0 < 18.0.0" from @nx/[email protected]
npm error node_modules/@nx/angular
npm error @nx/angular@"19.1.1" from the root project
npm error @nx/angular@"19.0.8" from @nrwl/[email protected]
npm error node_modules/@nrwl/angular
npm error @nrwl/angular@"19.0.8" from @nx/[email protected]
npm error 1 more (jest-preset-angular)
npm error
npm error Could not resolve dependency:
npm error dev @angular-devkit/build-angular@"18.0.7" from the root project
npm error
npm error Conflicting peer dependency: @angular/[email protected]
npm error node_modules/@angular/compiler-cli
npm error peer @angular/compiler-cli@"^18.0.0" from @angular-devkit/[email protected]
npm error node_modules/@angular-devkit/build-angular
npm error dev @angular-devkit/build-angular@"18.0.7" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
Sometimes i get this error
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: @bi/[email protected]
npm error Found: @angular/[email protected]
npm error node_modules/@angular/core
npm error @angular/core@"18.0.7" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @angular/core@"^17.0.0" from @ngrx/[email protected]
npm error node_modules/@ngrx/effects
npm error @ngrx/effects@"17.1.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\....\AppData\Local\npm-cache\_logs\2025-06-06T07_49_55_829Z-eresolve-report.txt
Package Manager Version
npm: 10.9.2
Operating System
- [ ] macOS
- [ ] Linux
- [x] Windows
- [ ] Other (Please specify)
Additional Information
Current Nx version 19.0.8 here is my package.json file
{
"name": "@bi/source",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "node devextreme-config/devextreme-license-producer.js"
},
"private": true,
"dependencies": {
"@angular/animations": "17.3.12",
"@angular/cdk": "17.3.10",
"@angular/common": "17.3.12",
"@angular/compiler": "17.3.12",
"@angular/core": "17.3.12",
"@angular/forms": "17.3.12",
"@angular/platform-browser": "17.3.12",
"@angular/platform-browser-dynamic": "17.3.12",
"@angular/router": "17.3.12",
"@azure/msal-angular": "^3.0.10",
"@azure/msal-browser": "^3.7.0",
"@fortawesome/fontawesome-pro": "^6.4.0",
"@growthbook/growthbook": "^1.3.1",
"@microsoft/applicationinsights-web": "~3.0.8",
"@ngneat/until-destroy": "^10.0.0",
"@ngrx/effects": "17.1.0",
"@ngrx/entity": "17.1.0",
"@ngrx/router-store": "17.1.0",
"@ngrx/store": "17.1.0",
"@ngrx/store-devtools": "17.1.0",
"@nx/angular": "19.0.8",
"@types/uuid": "^9.0.8",
"devextreme": "24.1.4",
"devextreme-angular": "24.1.4",
"file-saver": "^2.0.5",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.8.2",
"jszip": "^3.10.1",
"moment": "^2.30.1",
"rxjs": "~7.8.0",
"ts-util-is": "^2.0.2",
"tslib": "^2.3.0",
"url-join": "^5.0.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.3.9",
"@angular-devkit/core": "17.3.9",
"@angular-devkit/schematics": "17.3.9",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~17.3.0",
"@angular/compiler-cli": "17.3.12",
"@angular/language-service": "17.3.12",
"@ngrx/schematics": "17.1.0",
"@nx/cypress": "19.0.8",
"@nx/eslint": "19.0.8",
"@nx/eslint-plugin": "19.0.8",
"@nx/jest": "19.0.8",
"@nx/js": "19.0.8",
"@nx/web": "19.0.8",
"@nx/workspace": "19.0.8",
"@schematics/angular": "17.3.9",
"@swc-node/register": "~1.8.0",
"@swc/core": "~1.3.85",
"@swc/helpers": "~0.5.2",
"@types/file-saver": "^2.0.7",
"@types/jest": "^29.4.0",
"@types/node": "18.16.9",
"@types/url-join": "^4.0.3",
"@typescript-eslint/eslint-plugin": "7.3.0",
"@typescript-eslint/parser": "7.3.0",
"cypress": "^13.6.6",
"eslint": "8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.13.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-ngrx": "^2.1.4",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jest-preset-angular": "14.0.4",
"jsonc-eslint-parser": "^2.1.0",
"ng-packagr": "17.3.0",
"nx": "19.0.8",
"prettier": "^3.3.2",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"typescript": "5.4.5"
}
}
After executing npx nx migrate 19.1.1, here is my package.json file
{
"name": "@bi/source",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "node devextreme-config/devextreme-license-producer.js"
},
"private": true,
"dependencies": {
"@angular/animations": "18.0.7",
"@angular/cdk": "18.0.6",
"@angular/common": "18.0.7",
"@angular/compiler": "18.0.7",
"@angular/core": "18.0.7",
"@angular/forms": "18.0.7",
"@angular/platform-browser": "18.0.7",
"@angular/platform-browser-dynamic": "18.0.7",
"@angular/router": "18.0.7",
"@azure/msal-angular": "^3.0.10",
"@azure/msal-browser": "^3.7.0",
"@fortawesome/fontawesome-pro": "^6.4.0",
"@growthbook/growthbook": "^1.3.1",
"@microsoft/applicationinsights-web": "~3.0.8",
"@ngneat/until-destroy": "^10.0.0",
"@ngrx/effects": "17.1.0",
"@ngrx/entity": "17.1.0",
"@ngrx/router-store": "17.1.0",
"@ngrx/store": "17.1.0",
"@ngrx/store-devtools": "17.1.0",
"@nx/angular": "19.1.1",
"@types/uuid": "^9.0.8",
"devextreme": "24.1.4",
"devextreme-angular": "24.1.4",
"file-saver": "^2.0.5",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.8.2",
"jszip": "^3.10.1",
"moment": "^2.30.1",
"rxjs": "~7.8.0",
"ts-util-is": "^2.0.2",
"tslib": "^2.3.0",
"url-join": "^5.0.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "18.0.7",
"@angular-devkit/core": "18.0.7",
"@angular-devkit/schematics": "18.0.7",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~17.3.0",
"@angular/compiler-cli": "18.0.7",
"@angular/language-service": "18.0.7",
"@ngrx/schematics": "17.1.0",
"@nx/cypress": "19.1.1",
"@nx/eslint": "19.1.1",
"@nx/eslint-plugin": "19.1.1",
"@nx/jest": "19.1.1",
"@nx/js": "19.1.1",
"@nx/web": "19.1.1",
"@nx/workspace": "19.1.1",
"@schematics/angular": "18.0.7",
"@swc-node/register": "~1.8.0",
"@swc/core": "~1.3.85",
"@swc/helpers": "~0.5.2",
"@types/file-saver": "^2.0.7",
"@types/jest": "^29.4.0",
"@types/node": "18.16.9",
"@types/url-join": "^4.0.3",
"@typescript-eslint/eslint-plugin": "7.3.0",
"@typescript-eslint/parser": "7.3.0",
"cypress": "13.8.0",
"eslint": "8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.13.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-ngrx": "^2.1.4",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jest-preset-angular": "14.1.1",
"jsonc-eslint-parser": "^2.1.0",
"ng-packagr": "18.0.0",
"nx": "19.1.1",
"prettier": "^3.3.2",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"typescript": "5.4.5"
}
}
I do see this from time to time, too. For me, deleting packagelock and nodemodules works, not ideal, but every so often required. I do think this is an NPM problem because Deno and Bun were able to install it every time... (however, I only use them to install it once and continue with NPM)
PS: I often see it on pure angular workspaces too
Thanks @Akxe
I did switch to Bun package manager and it did the trick, so i migrated Nx:
- 19.0.8 --> 19.1.1
- 19.1.1 --> 19.2.1
but now i am at Nx version 19.2.1 and when i give bun install i get:
bun install
bun install v1.2.15 (df017990)
warn: incorrect peer dependency "@angular/[email protected]"
warn: incorrect peer dependency "@angular/[email protected]"
warn: incorrect peer dependency "@angular/[email protected]"
warn: incorrect peer dependency "@angular/[email protected]"
warn: incorrect peer dependency "@angular/[email protected]"
warn: incorrect peer dependency "@angular/[email protected]"
⚙️ cypress [6/6] warn: nx's postinstall cost you 30.5s
warn: nx's postinstall cost you 1m656ms
warn: nx's postinstall cost you 1m30.8s
.......... forever .........
and this never ends.
So it seems like one migration was ok but moved errors on next migration.
Remove the package lock, bun lock and node_modules and try again... it will work... not good, not correct, but it will get you moving...
That did the trick.
Used bun through out the process, did not mind the warnings of step 19.1.1 --> 19.2.1.
Then all worked fine with no warning, no errors.
So i managed to migrate to 20.1.4 version pretty straight forward.
@Akxe thank you very much, I appreciate the help.
Hey there! 👋
Thanks for the detailed report - this is definitely a frustrating one. Unfortunately this is a result of NgRx shipping their version 18 support later.
What's happening
When you migrate from 19.0.8 → 19.1.1, Nx updates Angular to 18.0.7 but NgRx stays at 17.1.0, because their version 18 support was not released at the time. The problem is that NgRx migrations only kick in at Nx 19.4.0+, so you're stuck in this weird in-between state.
Quick fixes
Option 1: Skip ahead (recommended)
# Instead of 19.1.1, go straight to a version with NgRx migrations such as `19.6.1`
npx nx migrate 19.6.1
npm install
npx nx migrate --run-migrations
Option 2: Manual NgRx update
# After your 19.1.1 migration, manually bump NgRx
npm install @ngrx/store@^18.0.2 @ngrx/effects@^18.0.2 @ngrx/router-store@^18.0.2 @ngrx/store-devtools@^18.0.2
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.