fix(remix): correct migration implementation path for flat-build packages#35899
Merged
Conversation
…ages The createNodesV2->createNodes rename migration (#35893) was registered with a `./dist/src/migrations/...` implementation path for @nx/remix and @nx/nuxt. Both are flat-build packages (main: ./index.js) that publish their files at the package root, so the dist/ prefix does not resolve and `nx migrate` fails with "Could not resolve implementation". Point both to `./src/migrations/...` to match the published layout, in line with the other flat-build plugins (angular, next, expo, etc.).
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit b3a1fcc
☁️ Nx Cloud last updated this comment at |
The rename-create-nodes-v2-types migration only rewrote the named bindings
of import/export statements, leaving in-body references to a renamed binding
dangling. A file like `export const createNodesV2: CreateNodesV2 = [...]`
became `import type { CreateNodes }` with the annotation still reading
`CreateNodesV2`, producing TS2552 "Cannot find name 'CreateNodesV2'".
Track non-aliased import specifiers whose local binding changes and rewrite
their in-body references too (type annotations and value usages), skipping
member positions (foo.CreateNodesV2) and the import/export specifiers
themselves. Aliased imports keep their local name, so they are untouched.
f323882 to
b3a1fcc
Compare
AgentEnder
approved these changes
Jun 6, 2026
vrxj81
pushed a commit
to vrxj81/nx
that referenced
this pull request
Jun 7, 2026
…ages (nrwl#35899) ## Current Behavior The `createNodesV2` → `createNodes` rename migrations added in nrwl#35893 registered the `update-23-0-0-migrate-create-nodes-v2-import` migration for **@nx/remix** and **@nx/nuxt** with a `./dist/src/migrations/...` implementation path. Both are flat-build packages (`main: ./index.js`) whose files are published at the package root, not under a `dist/` directory. As a result, `nx migrate` fails when it reaches these migrations: ``` NX Could not resolve implementation for migration "update-23-0-0-migrate-create-nodes-v2-import" from .../node_modules/@nx/remix/migrations.json ``` ## Expected Behavior The migration resolves and runs. The implementation/documentation paths for the flat-build packages point to `./src/migrations/...`, matching the published package layout — consistent with the other flat-build plugins (angular, next, expo, react-native, react), which already use the `./src/...` prefix. Audited all 23 plugins touched by nrwl#35893: only `@nx/remix` and `@nx/nuxt` were mismatched. Dist-build packages (webpack, vite, jest, etc.) correctly keep the `./dist/src/...` prefix. ## Related Issue(s) Follow-up fix to nrwl#35893.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
The
createNodesV2→createNodesrename migrations added in #35893 registered theupdate-23-0-0-migrate-create-nodes-v2-importmigration for @nx/remix and @nx/nuxt with a./dist/src/migrations/...implementation path.Both are flat-build packages (
main: ./index.js) whose files are published at the package root, not under adist/directory. As a result,nx migratefails when it reaches these migrations:Expected Behavior
The migration resolves and runs. The implementation/documentation paths for the flat-build packages point to
./src/migrations/..., matching the published package layout — consistent with the other flat-build plugins (angular, next, expo, react-native, react), which already use the./src/...prefix.Audited all 23 plugins touched by #35893: only
@nx/remixand@nx/nuxtwere mismatched. Dist-build packages (webpack, vite, jest, etc.) correctly keep the./dist/src/...prefix.Related Issue(s)
Follow-up fix to #35893.