Skip to content

fix(remix): correct migration implementation path for flat-build packages#35899

Merged
FrozenPandaz merged 2 commits into
masterfrom
fix/remix-nuxt-migration-impl-path
Jun 6, 2026
Merged

fix(remix): correct migration implementation path for flat-build packages#35899
FrozenPandaz merged 2 commits into
masterfrom
fix/remix-nuxt-migration-impl-path

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

Current Behavior

The createNodesV2createNodes rename migrations added in #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 #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 #35893.

…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.).
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner June 6, 2026 04:56
@FrozenPandaz FrozenPandaz requested a review from JamesHenry June 6, 2026 04:56
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 6, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit b3a1fcc
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a23b2e5a9b3bc0008014957
😎 Deploy Preview https://deploy-preview-35899--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 6, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit b3a1fcc
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a23b2e5a9b3bc000801495b
😎 Deploy Preview https://deploy-preview-35899--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Jun 6, 2026

View your CI Pipeline Execution ↗ for commit b3a1fcc

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 37m 13s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 56s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 17s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-06-06 06:22:08 UTC

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.
@FrozenPandaz FrozenPandaz force-pushed the fix/remix-nuxt-migration-impl-path branch from f323882 to b3a1fcc Compare June 6, 2026 05:40
@FrozenPandaz FrozenPandaz merged commit 6d11894 into master Jun 6, 2026
26 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/remix-nuxt-migration-impl-path branch June 6, 2026 13:44
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants