Gatsby upgrade complete!

Posted: 10 November, 2018 Category: code Tagged: gatsby

I'd forgotten I'd built this site in the gatsby 1.x era. Over time, adding new plugins and playing with different features, I was straying into 2.x territory... but not properly. I was getting away with a lot of things until all of a sudden, the install stopped dead. I mean, DEAD. Gatsby build couldn't find... couldn't find Gatsby.

WOAH.

Mind you, the climbing number of vulnerabilities listed by npm audit should've been a tell.

After lots of poking around and cursing I found that the following (in multiply-permuted, repeat iterations, so that the exact recipe is unknowable) worked:

  • nuke node_modules folder
  • upgrade every gatsby- prefixed module to @latest
  • npm ls every single packages that seem to be stuck in the dark ages, whining about peer dependencies that everyone has moved on from. Chances are good that nothing depends on them, in which case you are free to delete them forever.

This is what seems to have worked for me.