You probably are more skilled at this than I am.
I usually take the approach you described also. Update a package, research the breaking changes, and test thoroughly.
In this case, I used meteor npm outdated
to see what needed to be updated, but doing those updates alone didn’t work because of dependencies of included packages. I deleted the node_modules folder first. Then meteor npm update
wouldn’t install a single package.
I was looking at this and couldn’t figure out what to update in what order:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [at]apollo/react-common[at]3.1.4
npm ERR! Found: graphql[at]16.8.1
npm ERR! node_modules/graphql
npm ERR! graphql[at]"^16.8.1" from the root project
npm ERR! peer graphql[at]"14.x || 15.x || 16.x" from [at]apollo/cache-control-types[at]1.0.3
npm ERR! node_modules/[at]apollo/cache-control-types
npm ERR! [at]apollo/cache-control-types[at]"^1.0.3" from [at]apollo/server[at]4.10.4
npm ERR! node_modules/[at]apollo/server
npm ERR! [at]apollo/server[at]"^4.10.4" from the root project
npm ERR! 39 more ([at]apollo/client, [at]apollo/server, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql[at]"^14.3.1" from [at]apollo/react-common[at]3.1.4
npm ERR! node_modules/[at]apollo/react-common
npm ERR! [at]apollo/react-common[at]"^3.1.4" from the root project
npm ERR! [at]apollo/react-common[at]"^3.1.4" from [at]apollo/react-components[at]3.1.5
npm ERR! node_modules/[at]apollo/react-components
npm ERR! [at]apollo/react-components[at]"^3.1.5" from [at]apollo/react-hoc[at]3.1.5
npm ERR! node_modules/[at]apollo/react-hoc
npm ERR! [at]apollo/react-hoc[at]"^3.1.5" from react-apollo[at]3.1.5
npm ERR! node_modules/react-apollo
npm ERR! 1 more (react-apollo)
npm ERR! 4 more ([at]apollo/react-hoc, [at]apollo/react-hooks, ...)
npm ERR!
npm ERR! Conflicting peer dependency: graphql[at]14.7.0
npm ERR! node_modules/graphql
npm ERR! peer graphql[at]"^14.3.1" from [at]apollo/react-common[at]3.1.4
npm ERR! node_modules/[at]apollo/react-common
npm ERR! [at]apollo/react-common[at]"^3.1.4" from the root project
npm ERR! [at]apollo/react-common[at]"^3.1.4" from [at]apollo/react-components[at]3.1.5
npm ERR! node_modules/[at]apollo/react-components
npm ERR! [at]apollo/react-components[at]"^3.1.5" from [at]apollo/react-hoc[at]3.1.5
npm ERR! node_modules/[at]apollo/react-hoc
npm ERR! [at]apollo/react-hoc[at]"^3.1.5" from react-apollo[at]3.1.5
npm ERR! node_modules/react-apollo
npm ERR! 1 more (react-apollo)
npm ERR! 4 more ([at]apollo/react-hoc, [at]apollo/react-hooks, ...)
Here’s what my package.json looked like at the time:
{
“name”: “my app”,
“private”: true,
“version”: “1.0.0”,
“scripts”: {
“start”: “meteor run”
},
“devDependencies”: {
“[at]meteorjs/eslint-config-meteor”: “^1.0.5”,
“babel-eslint”: “^10.1.0”,
“caniuse-lite”: “^1.0.30001620”,
“eslint”: “^8.57.0”,
“eslint-config-airbnb”: “^19.0.4”,
“eslint-import-resolver-meteor”: “^0.4.0”,
“eslint-plugin-import”: “^2.29.1”,
“eslint-plugin-jsx-a11y”: “^6.8.0”,
“eslint-plugin-meteor”: “^7.3.0”,
“eslint-plugin-react”: “^7.34.1”
},
“dependencies”: {
“-”: “0.0.1”,
“[at]apollo/react-common”: “^3.1.4”,
“[at]apollo/client”: “^3.10.4”,
“[at]apollo/server”: “^4.10.4”,
“[at]breejs/later”: “^4.2.0”,
“[at]culturehq/add-to-calendar”: “^1.1.2”,
“[at]date-io/date-fns”: “^2.17.0”,
“[at]date-io/moment”: “^2.17.0”,
“[at]emotion/react”: “^11.11.4”,
“[at]emotion/styled”: “^11.11.5”,
“[at]fvilers/disable-react-devtools”: “^1.3.0”,
“[at]graphql-tools/schema”: “^10.0.3”,
“[at]maxmind/geoip2-node”: “^5.0.0”,
“[at]mui/icons-material”: “^5.15.18”,
“[at]mui/lab”: “^5.0.0-alpha.170”,
“[at]mui/material”: “^5.15.18”,
“[at]mui/styles”: “^5.15.18”,
“[at]mui/system”: “^5.15.15”,
“[at]mui/x-date-pickers”: “^6.19.9”,
“[at]types/react”: “^16.14.60”,
“[at]use-it/event-listener”: “^0.1.7”,
“agora-rtc-sdk-ng”: “^4.20.2”,
“apollo-cache-inmemory”: “^1.6.6”,
“apollo-client-preset”: “^1.0.8”,
“apollo-graphql”: “^0.9.7”,
“apollo-link-ddp”: “^3.0.0”,
“apollo-link-error”: “^1.1.13”,
“apollo-link-ws”: “^1.0.20”,
“apollo-server”: “^3.13.0”,
“apollo-server-core”: “^3.13.0”,
“axios”: “^1.6.8”,
“babel-plugin-inline-import”: “^3.0.0”,
“babel-runtime”: “^6.26.0”,
“bcrypt”: “^5.1.1”,
“body-parser”: “^1.20.2”,
“braintree”: “^3.23.0”,
“braintree-web”: “^3.102.0”,
“braintree-web-drop-in”: “^1.42.0”,
“braintree-web-drop-in-react”: “^1.2.1”,
“calendar-link”: “^2.6.0”,
“compress”: “^0.99.0”,
“cors”: “^2.8.5”,
“date-fns”: “^2.30.0”,
“date-fns-timezone”: “^0.1.4”,
“date-fns-tz”: “^2.0.1”,
“dayjs”: “^1.11.11”,
“deep-diff”: “^1.0.2”,
“downshift”: “^8.5.0”,
“email-validator”: “^2.0.4”,
“emoji-picker-react”: “^4.9.2”,
“express”: “^4.19.2”,
“formik”: “^2.4.6”,
“framer-motion”: “^10.18.0”,
“fs”: “0.0.1-security”,
“graphql”: “^16.8.1”,
“graphql-scalars”: “^1.23.0”,
“graphql-subscriptions”: “^2.0.0”,
“graphql-tag”: “^2.12.6”,
“graphql-type-json”: “^0.3.2”,
“helmet”: “^6.2.0”,
“http-proxy”: “^1.18.1”,
“ics”: “^3.7.2”,
“immutability-helper”: “^3.1.1”,
“jstimezonedetect”: “^1.0.7”,
“lodash”: “^4.17.21”,
“logrocket”: “^7.0.0”,
“lozad”: “^1.16.0”,
“meteor-node-stubs”: “^1.2.9”,
“node-rsa”: “^1.1.1”,
“pg”: “^8.11.5”,
“pubsub”: “^3.2.1”,
“qrcode”: “^1.5.3”,
“raw-body”: “^2.5.2”,
“react”: “^18.3.1”,
“react-apollo”: “^3.1.5”,
“react-cache”: “^2.0.0-alpha.1”,
“react-dom”: “^18.3.1”,
“react-ga4”: “^2.1.0”,
“react-gtm-module”: “^2.0.11”,
“react-helmet”: “^6.1.0”,
“react-hook-form”: “^7.51.4”,
“react-intersection-observer”: “^9.10.2”,
“react-lazyload”: “^3.2.1”,
“react-mounter”: “^1.2.0”,
“react-router-dom”: “^6.23.1”,
“react-swipeable”: “^7.0.1”,
“react-use”: “^17.5.0”,
“request”: “^2.88.2”,
“rough-notation”: “^0.5.1”,
“save”: “^2.9.0”,
“scroll-into-view-if-needed”: “^3.1.0”,
“scroll-to-element”: “^2.0.3”,
“sequelize”: “^6.37.3”,
“smooth-scroll-into-view-if-needed”: “^2.0.2”,
“stopword”: “^2.0.8”,
“subscriptions-transport-ws”: “^0.11.0”,
“twilio”: “^4.23.0”,
“underscore”: “^1.13.6”,
“uploadcare-widget”: “^3.21.2”,
“vary”: “^1.1.2”,
“webfontloader”: “1.6.28”,
“ws”: “^8.17.0”,
“xml-js”: “^1.6.11”,
“yup”: “^1.4.0”
}
}
Note: “@” has been replaced with “[at]” because the forum sofware thought I was mentioning too many forum users.
Going from node 14 to node 20 can mean a lot of interconnected updates.