Upgrade from 0.27.1 to 0.28.* breaks


I haven’t touched this project in a while and I’m going through the upgrade process all the way from 0.23.0 to hopefully the latest version before 1.0 hits.

Upgrading between 0.23.0 and 0.27.1 has been relatively smooth, and currently everything works when on 0.27.1. However, when I upgrade to 0.28.0, my project breaks and I can’t start the dev server. This is the same regardless of what minor version I choose between 0.28.0 and 0.28.4.

I followed the v0.28.0 upgrade steps of:

  • Update db.js with given contents
  • Create and paste in logger.js contents in the same directory as db.js
  • Run yarn rw upgrade --tag 0.28.0 and pin all versions to ^0.28.0 in package.json files

My NodeJS version: 14.17.5

yarn rw dev error output
api | Running at 'http://localhost:8911'
api | Watching files in '/home/me/development/projects/my-project/api/src/functions'
web | The CLI moved into a separate package: webpack-cli
web | Please install 'webpack-cli' in addition to webpack itself to use the CLI
web | -> When using npm: npm i -D webpack-cli
web | -> When using yarn: yarn add -D webpack-cli
web | internal/modules/cjs/loader.js:892
web |   throw err;
web |   ^
web |
web | Error: Cannot find module 'webpack-cli/bin/config-yargs'
web | Require stack:
web | - /home/me/development/projects/my-project/node_modules/webpack-dev-server/bin/webpack-dev-server.js
web | - /home/me/development/projects/my-project/node_modules/import-local/index.js
web | - /home/me/development/projects/my-project/node_modules/@redwoodjs/core/node_modules/webpack-dev-server/bin/webpack-dev-server.js
web |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
web |     at Function.Module._load (internal/modules/cjs/loader.js:745:27)
web |     at Module.require (internal/modules/cjs/loader.js:961:19)
web |     at require (internal/modules/cjs/helpers.js:92:18)
web |     at Object.<anonymous> (/home/me/development/projects/my-project/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
web |     at Module._compile (internal/modules/cjs/loader.js:1072:14)
web |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
web |     at Module.load (internal/modules/cjs/loader.js:937:32)
web |     at Function.Module._load (internal/modules/cjs/loader.js:778:12)
web |     at Module.require (internal/modules/cjs/loader.js:961:19) {
web |   code: 'MODULE_NOT_FOUND',
web |   requireStack: [
web |     '/home/me/development/projects/my-project/node_modules/webpack-dev-server/bin/webpack-dev-server.js',
web |     '/home/me/development/projects/my-project/node_modules/import-local/index.js',
web |     '/home/me/development/projects/my-project/node_modules/@redwoodjs/core/node_modules/webpack-dev-server/bin/webpack-dev-server.js'
web |   ]
web | }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
web | cd "/home/me/development/projects/my-project/web" && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js  exited with code 1

What do you recommend I do? Have I missed something?

Hi @sachanganesh There were some strange dependency issues related to both Apollo and Webpack. Most likely you did the upgrades correctly. But perhaps you didn’t upgrade to the correct patch release 0.28.4. Take a look at this Forum post comments for more info:

^^ Also, this post might be a better place to comment for help.

Along the way, here are some tricks you can try if you run into yarn install or package related errors:

  • try npx yarn-deduplicate
  • delete all node_modules directories
  • delete yarn.lock and recreate (yarn install)

Thanks! Not sure what I did differently, but it worked!