How to downgrade Gatsby version from 3.14.2 to ^2.0.0

Viewed 573

I have a Gatsby starter (taylorbryant/gatsby-starter-tailwind) that uses gatsby-plugin-postcss which is not compatible with the version of gatsby installed in my machine like a few other plugins used in the starter. You can see the warning I get when trying to build for production.

warn Plugin gatsby-plugin-postcss is not compatible with your gatsby version 3.14.2 - It requires gatsby@^2.0.0

How can I downgrade Gatsby to a specific version, maybe just locally?

1 Answers

This isn't too difficult.

  1. Open your package.json file and change the actual version you want to use.
  2. Then run npm update to make sure you update all the packages to the right version.

Please correct me if I'm wrong but I believe that is the way to change the Gatsby version.

Please do keep in mind that this is most probably cause a bunch of other discrepancies with other packages that actually require a higher version in order to work.

You can find more information about how different versions work here: https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/

Best of luck!

Related