Upgrading to Redwood v0.20 🤗

Admittedly, Redwood v0.20 is the most ambitious upgrade for existing apps. Primarily, this has to do with the recent upgrade to the Apollo Client v3, which comes with a lot of changes to the GraphQL Cache.

If you’re looking for help upgrading (or looking to help others upgrade), this is the place to do it. Please ask your questions, post your code, and comment away!

Besides, you’re not going to let Shia down, are you?

2 Likes

Hello!

After letting Shia down for 26 long days I’ve decided to upgrade to 0.20.0 :slight_smile:

In doing so I’ve made the code modifications laid out in the announcement post, edited the scaffold-generated files one-by-one instead of regenerating with the --force flag, so as not to lose modifications I’ve made.

Everything seems to be working just fine in dev, but when deploying I’m getting this error at the very end of the build process:

3:19:51 PM: 2 new files to upload
3:19:51 PM: 2 new functions to upload
3:19:57 PM: Request must be smaller than 69905067 bytes for the CreateFunction operation
3:19:57 PM: Request must be smaller than 69905067 bytes for the CreateFunction operation
3:21:24 PM: Failed to upload file: graphql
3:21:44 PM: Failed to upload file: [FUNCTION_NAME]-background

What’s strange is that neither of these functions seem to be large enough to go above the stated limit – they’re 55.8 mb compressed / 178.4 mb decompressed (which I checked via Tobbe’s instructions here), and I haven’t added any new dependencies since my last successful deploy earlier this morning – I’ve only upgraded and made manual code changes.

I assume the solution here will end up being that I need to remove a dependency (the only ones I have right now are luxon, jsdom, axios, and repeater) to decrease my bundle size, but I’d welcome any other thoughts before I start working on converting date manipulation from using luxon to JS’s native Date class.

The fact that I’m ~14 mb below the stated limit makes me think there might be something else going on here, perhaps related to upgrading? :thinking:

@tctrautman I was the first to encounter this issue over here https://github.com/redwoodjs/playground-auth/pull/9 It’s a helpful thread for future diagnosing. (Been out of the loop as well. I Will post in the Issue you link to above as well.)

Somethings going on with @babel if you ask me. Regardless, it seems the way forward is to:

  1. delete node_modules
  2. delete yarn.lock then
  3. run yarn, test things out, and redeploy

Something else that changed in v0.20.0 is needing to add the second binaryTarget bumped the size, which means we might have been encountering @bable problems for awhile now but just didn’t notice it until now. TBD

Keep me posted!

1 Like

Worked like a charm – thank you @thedavid!

1 Like

:rocket:Great to hear! Thank you for letting me know.

1 Like