[Feature] NX21 Support
Is your feature request related to a problem? Please describe
Migration to NX 21 Workspace does not work because it uses old 'createNodes' implementation.
NX Plugin @nxrocks/nx-spring-boot only provides createNodes which was removed in Nx 21, it should provide a createNodesV2 implementation.
Describe the idea you'd like
Upgrade 'createNodes' implementation to support latest NX Workspace.
Describe alternatives you've considered
No response
Additional context
No response
Hi @ProfEibe
Thanks for using the plugin and reporting the issue.
Although this is very strange, because all my plugins exposed both CreateNode and CreateNodeV2, for the graph . Nx should be able to pick the correct one based on the version...
Can provide the exact stack trace you got and the failing plugin you used?
Hm strange. Yes of course, I'm using the nx-spring-boot plugin (10.2.6 but thought it would upgrade to the latest) and this should be the full part:
NX Running migrations from 'migrations.json'
Running the following migrations:
- @angular/cdk: migration-v20 (Updates the Angular CDK to v20)
- angular-eslint: update-20-0-0 (Updates @angular-eslint to v20)
- @angular/core: inject-flags (Replaces usages of the deprecated InjectFlags enum)
- @angular/core: test-bed-get (Replaces usages of the deprecated TestBed.get method with TestBed.inject)
- @angular/core: control-flow-migration (Converts the entire application to block control flow syntax)
- @angular/core: document-core (Moves imports of `DOCUMENT` from `@angular/common` to `@angular/core`)
- @nx/angular: update-angular-cli-version-19-2-0 (Update the @angular/cli package version to ~19.2.0.)
- @nx/angular: set-continuous-option (Set the `continuous` option to `true` for continuous tasks.)
- nx: remove-legacy-cache (Removes the legacy cache configuration from nx.json)
- nx: remove-custom-tasks-runner (Removes the legacy cache configuration from nx.json)
- @nx/jest: replace-getJestProjects-with-getJestProjectsAsync-v21 (Replace usage of `getJestProjects` with `getJestProjectsAsync`.)
- @nx/jest: remove-tsconfig-option-from-jest-executor (Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.)
- nx: release-version-config-changes (Updates release version config based on the breaking changes in Nx v21)
- nx: release-changelog-config-changes (Updates release changelog config based on the breaking changes in Nx v21)
- nx: 21-1-0-add-ignore-entries-for-nx-rule-files (Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present)
- @nx/angular: update-angular-cli-version-20-0-0 (Update the @angular/cli package version to ~20.0.0.)
- @nx/angular: migrate-provide-server-rendering-import (Migrate imports of `provideServerRendering` from `@angular/platform-server` to `@angular/ssr`.)
- @nx/angular: replace-provide-server-routing (Replace `provideServerRouting` and `provideServerRoutesConfig` with `provideServerRendering` using `withRoutes`.)
- @nx/angular: set-generator-defaults-for-previous-style-guide (Update the generator defaults to maintain the previous style guide behavior.)
- @nx/angular: update-module-resolution (Update 'moduleResolution' to 'bundler' in TypeScript configurations. You can read more about this here: https://www.typescriptlang.org/tsconfig/#moduleResolution.)
- @nx/jest: rename-test-path-pattern (Rename the CLI option `testPathPattern` to `testPathPatterns`.)
- @nx/jest: replace-removed-matcher-aliases (Replace removed matcher aliases in Jest v30 with their corresponding matcher)
- @nx/angular: update-angular-cli-version-20-1-0 (Update the @angular/cli package version to ~20.1.0.)
---------------------------------------------------------
Running migration @angular/cdk: migration-v20
NX Failed to run migration-v20 from @angular/cdk. This workspace is NOT up to date!
NX Plugin @nxrocks/nx-spring-boot only provides `createNodes` which was removed in Nx 21, it should provide a `createNodesV2` implementation.
Error: Plugin @nxrocks/nx-spring-boot only provides `createNodes` which was removed in Nx 21, it should provide a `createNodesV2` implementation.
at new LoadedNxPlugin (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\project-graph\plugins\loaded-nx-plugin.js:16:19)
at loadResolvedNxPluginAsync (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\project-graph\plugins\load-resolved-plugin.js:8:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async load (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\project-graph\plugins\isolation\plugin-worker.js:46:30)
at async consumeMessage (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\project-graph\plugins\isolation\messaging.js:42:26)
nx migrate [packageAndVersion]
Creates a migrations file or runs migrations from the migrations file.
- Migrate packages and create migrations.json (e.g., nx migrate @nx/workspace@latest)
- Run migrations (e.g., nx migrate --run-migrations=migrations.json). Use flag --if-exists to run migrations only if the migrations file exists.
Positionals:
packageAndVersion The target package and version (e.g, @nx/[email protected]). [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--verbose Prints additional information about the commands (e.g., stack traces). [boolean]
--runMigrations Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json). [string]
--ifExists Run migrations only if the migrations file exists, if not continues successfully. [boolean] [default: false]
--from Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nx/[email protected],@nx/[email protected]"). [string]
--to Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/[email protected],@nx/[email protected]"). [string]
-C, --createCommits Automatically create a git commit after each migration runs. [boolean] [default: false]
--commitPrefix Commit prefix to apply to the commit for each migration, when --create-commits is enabled. [string] [default: "chore: [nx migration] "]
--interactive Enable prompts to confirm whether to collect optional package updates and migrations. [boolean] [default: false]
--excludeAppliedMigrations Exclude migrations that should have been applied on previous updates. To be used with --from. [boolean] [default: false]
Examples:
migrate latest Update all Nx plugins to "latest". This will generate migrations.json
migrate 9.0.0 Update all Nx plugins to "9.0.0". This will generate migrations.json
migrate @nx/[email protected] --from="@nx/[email protected],@nx/[email protected]" Update @nx/workspace and generate the list of migrations starting with version 8.0.0 of @nx/workspace and @nx/node, regardless of what is installed locally
migrate @nx/[email protected] --to="@nx/[email protected],@nx/[email protected]" Update @nx/workspace to "9.0.0". If it tries to update @nx/react or @nx/angular, use version "9.0.1"
migrate [email protected] Update another-package to "12.0.0". This will update other packages and will generate migrations.json file
migrate latest --interactive Collect package updates and migrations in interactive mode. In this mode, the user will be prompted whether to apply any optional package update and migration
migrate latest [email protected] --exclude-applied-migrations Collect package updates and migrations starting with version 14.5.0 of "nx" (and Nx first-party plugins), regardless of what is installed locally, while excluding migrations that should have been applied on previous updates
migrate --run-migrations=migrations.json Run migrations from the provided migrations.json file. You can modify migrations.json and run this command many times
migrate --run-migrations --create-commits Create a dedicated commit for each successfully completed migration. You can customize the prefix used for each commit by additionally setting --commit-prefix="PREFIX_HERE "
Find more information and examples at https://nx.dev/nx/migrate
Error: Command failed: pnpm exec nx _migrate --run-migrations --verbose
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at runNxSync (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\utils\child-process.js:35:34)
at runLocalMigrate (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\command-line\migrate\migrate.js:1122:39)
at Object.runMigration (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\command-line\migrate\migrate.js:1145:9)
at Object.handler (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\command-line\migrate\command-object.js:13:68) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 6132,
stdout: null,
stderr: null
}
NX Command failed: pnpm exec nx migrate --run-migrations --verbose
Error: Command failed: pnpm exec nx migrate --run-migrations --verbose
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at runNxSync (C:\Users\xxx\AppData\Local\Temp\tmp-26204-qIRFkS7WL2O1\node_modules\.pnpm\[email protected]\node_modules\nx\src\utils\child-process.js:35:34)
at runMigrations (C:\Users\xxx\AppData\Local\Temp\tmp-26204-qIRFkS7WL2O1\node_modules\.pnpm\[email protected]\node_modules\nx\src\command-line\migrate\migrate.js:1037:39)
at C:\Users\xxx\AppData\Local\Temp\tmp-26204-qIRFkS7WL2O1\node_modules\.pnpm\[email protected]\node_modules\nx\src\command-line\migrate\migrate.js:1116:19
at async handleErrors (C:\Users\xxx\AppData\Local\Temp\tmp-26204-qIRFkS7WL2O1\node_modules\.pnpm\[email protected]\node_modules\nx\src\utils\handle-errors.js:8:24)
nx migrate [packageAndVersion]
Creates a migrations file or runs migrations from the migrations file.
- Migrate packages and create migrations.json (e.g., nx migrate @nx/workspace@latest)
- Run migrations (e.g., nx migrate --run-migrations=migrations.json). Use flag --if-exists to run migrations only if the migrations file exists.
Positionals:
packageAndVersion The target package and version (e.g, @nx/[email protected]). [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--verbose Prints additional information about the commands (e.g., stack traces). [boolean]
--runMigrations Execute migrations from a file (when the file isn't provided, execute migrations from migrations.json). [string]
--ifExists Run migrations only if the migrations file exists, if not continues successfully. [boolean] [default: false]
--from Use the provided versions for packages instead of the ones installed in node_modules (e.g., --from="@nx/[email protected],@nx/[email protected]"). [string]
--to Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/[email protected],@nx/[email protected]"). [string]
-C, --createCommits Automatically create a git commit after each migration runs. [boolean] [default: false]
--commitPrefix Commit prefix to apply to the commit for each migration, when --create-commits is enabled. [string] [default: "chore: [nx migration] "]
--interactive Enable prompts to confirm whether to collect optional package updates and migrations. [boolean] [default: false]
--excludeAppliedMigrations Exclude migrations that should have been applied on previous updates. To be used with --from. [boolean] [default: false]
Examples:
migrate latest Update all Nx plugins to "latest". This will generate migrations.json
migrate 9.0.0 Update all Nx plugins to "9.0.0". This will generate migrations.json
migrate @nx/[email protected] --from="@nx/[email protected],@nx/[email protected]" Update @nx/workspace and generate the list of migrations starting with version 8.0.0 of @nx/workspace and @nx/node, regardless of what is installed locally
migrate @nx/[email protected] --to="@nx/[email protected],@nx/[email protected]" Update @nx/workspace to "9.0.0". If it tries to update @nx/react or @nx/angular, use version "9.0.1"
migrate [email protected] Update another-package to "12.0.0". This will update other packages and will generate migrations.json file
migrate latest --interactive Collect package updates and migrations in interactive mode. In this mode, the user will be prompted whether to apply any optional package update and migration
migrate latest [email protected] --exclude-applied-migrations Collect package updates and migrations starting with version 14.5.0 of "nx" (and Nx first-party plugins), regardless of what is installed locally, while excluding migrations that should have been applied on previous updates
migrate --run-migrations=migrations.json Run migrations from the provided migrations.json file. You can modify migrations.json and run this command many times
migrate --run-migrations --create-commits Create a dedicated commit for each successfully completed migration. You can customize the prefix used for each commit by additionally setting --commit-prefix="PREFIX_HERE "
Find more information and examples at https://nx.dev/nx/migrate
Error: Command failed: C:\Users\xxx\AppData\Local\Temp\tmp-26204-qIRFkS7WL2O1\node_modules\.bin\nx _migrate --run-migrations --verbose
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at Object.runMigration (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\command-line\migrate\migrate.js:1138:42)
at Object.handler (C:\Users\xxx\dev\xxx\timetracking2\node_modules\.pnpm\[email protected]_@swc-node+regist_af52834e5f77f0bc51beb8ae20eb8575\node_modules\nx\src\command-line\migrate\command-object.js:13:68) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 35884,
stdout: null,
stderr: null
}