fix(react-native): fix TS2742 build error and retarget rollup/webpack migrations to beta.24#35896
Merged
Merged
Conversation
The inferred return type referenced @nx/devkit via a non-portable pnpm path, breaking the library build. Annotate as Promise<GeneratorCallback>.
✅ 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 ec5c5db
☁️ Nx Cloud last updated this comment at |
AgentEnder
approved these changes
Jun 5, 2026
vrxj81
pushed a commit
to vrxj81/nx
that referenced
this pull request
Jun 7, 2026
… migrations to beta.24 (nrwl#35896) ## Current Behavior - The `@nx/react-native` library build (`tsc --build tsconfig.lib.json`) fails with **TS2742**. The exported `addJest` helper has no explicit return type, so TypeScript infers `GeneratorCallback` and can only name it through a non-portable, pnpm-hashed `@nx/devkit` path when emitting the declaration file. - The `rewrite-rollup-internal-subpath-imports` and `rewrite-webpack-internal-subpath-imports` migrations are scheduled to run at `23.0.0-beta.25`. ## Expected Behavior - `addJest` is explicitly annotated as `Promise<GeneratorCallback>` (imported from `@nx/devkit`), giving `tsc` a portable name to emit. The library now builds cleanly. - Both internal-subpath-import migrations are retargeted to `23.0.0-beta.24` to align with the rest of the `23.0.0` migration batch. ## Related Issue(s) N/A
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
@nx/react-nativelibrary build (tsc --build tsconfig.lib.json) fails with TS2742. The exportedaddJesthelper has no explicit return type, so TypeScript infersGeneratorCallbackand can only name it through a non-portable, pnpm-hashed@nx/devkitpath when emitting the declaration file.rewrite-rollup-internal-subpath-importsandrewrite-webpack-internal-subpath-importsmigrations are scheduled to run at23.0.0-beta.25.Expected Behavior
addJestis explicitly annotated asPromise<GeneratorCallback>(imported from@nx/devkit), givingtsca portable name to emit. The library now builds cleanly.23.0.0-beta.24to align with the rest of the23.0.0migration batch.Related Issue(s)
N/A