Failed React 18 upgrade via nx migrate 13.10
See original GitHub issueCurrent Behavior
When running the 13.10 migration, the following changes are made to my package.json
:
devDependencies
- Upgraded
@types/react
to17.0.43
- Upgraded
@types/react-dom
to17.0.14
- Upgraded
dependencies
- Added
react-is
version18.0.0
- Added
react-test-renderer
version18.0.0
- Added
Note: This migration results in two versions of react-test-renderer
: v17 as a dev dependency, and v18 as an actual dependency.
Expected Behavior
Per the 13.10 release notes, nx migrate 13.10
should upgrade to React 18.
I would expect the following package.json
changes to be made:
devDependencies
- Upgrade
@types/react
to18.0.0
- Upgrade
@types/react-dom
to18.0.0
- Upgrade
react-test-renderer
to18.0.0
- Upgrade
dependencies
- Add
react-is
version18.0.0
- Upgrade
react
to version18.0.0
- Upgrade
react-dom
to version18.0.0
- Add
Steps to Reproduce
- Start with a <= 13.9 Nx workstation with react libraries/apps.
- Run
nx migrate latest
- Run
npm i
- Run
nx migrate --run-migrations
- Check changes to root
package.json
Environment
Node : 16.14.2
OS : darwin x64
npm : 8.5.0
nx : 13.10.0
@nrwl/angular : Not Found
@nrwl/cypress : 13.10.0
@nrwl/detox : Not Found
@nrwl/devkit : 13.10.0
@nrwl/eslint-plugin-nx : 13.10.0
@nrwl/express : Not Found
@nrwl/jest : 13.10.0
@nrwl/js : 13.10.0
@nrwl/linter : 13.10.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 13.2.2
@nrwl/nx-plugin : Not Found
@nrwl/react : 13.10.0
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 13.10.0
@nrwl/web : 13.10.0
@nrwl/workspace : 13.10.0
typescript : 4.5.5
rxjs : 6.6.7
---------------------------------------
Community plugins:
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:5 (4 by maintainers)
Top Results From Across the Web
React 18 Migration | Nx
For manual update, go to React Native Upgrade Helper and copy the diff to your native code one by one. Nevertheless, you can...
Read more >What is new in Nx 13.10?
Nx 13.10 introduces support for the latest React v18 release such that users can benefit from the latest features React has to offer....
Read more >Nx 13 Migration failure: update-tasks-runner - Stack Overflow
Failed to run 13-10-0-update-tasks-runner from @nrwl/workspace. This workspace is NOT up to date! Cannot read property 'default' of undefined.
Read more >The ultimate migration guide to angular-eslint, ESLint and Nx 11
As of Nx version 11.0.18, angular-eslint version 0.8.0-beta.1 is installed. Let's update it to the latest version. Using NPM CLI:
Read more >NX Nastran User's Guide - Siemens PLM
Example: Using NX Nastran Input Files to Model a Truss . ... 3-18. Parameters in the Superelement Solution Sequences .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ll release a patch soon for 13.10.2.
Workaround for now is to manually update your packages for
@types/react
,@types/react-dom
,react-test-renderer
.@jaysoo #9613 is not updating the
react
,react-dom
&react-test-renderer
version, it’s only addingreact-is@18.0.0
in mypackage.json
This is caused by the fact that it’s using the
addDependenciesToPackageJson
function, which is literally only adding dependencies, not updating them.