Skip to content

Instantly share code, notes, and snippets.

@AlexJuarez
Created May 8, 2025 11:21
Show Gist options
  • Save AlexJuarez/42aa1ff47fb3339ee1ea3aa31e734e60 to your computer and use it in GitHub Desktop.
Save AlexJuarez/42aa1ff47fb3339ee1ea3aa31e734e60 to your computer and use it in GitHub Desktop.

Retrospective on Migration

To make this migration easier to understand I have split the parts of the upgrades into sections

Dependencies compatibility checking and resolution

  • Update node to lts/hydrogen or node v18.20.8
  • Install the latest version of yarn, yarn 4.6.3 at the time
  • install nvm
#install and make node 18 the default
nvm install lts/hydrogen
nvm alias default lts/hydrogen
nvm use default

#remove the old yarn 1.22 if present
npm uninstall -g yarn

#install corepack a requirement to install yarn
npm i -g corepack

corepack install yarn
corepack enable yarn
#if this fails see https://github.com/nodejs/corepack/blob/main/README.md#corepack-enable--nam

Cont 2:

  • Update react-dom, @types/react, @types/react-dom, @types/react-router-dom to v18
  • use npm-check-updates to see what packages need to change to satisfiy peer dependencies.
  • additionally verify the correct peer depedencies with yarn upgrade-interactive
npm install -g npm-check-updates
# run
ncu
# run
yarn upgrade-interactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment