September 19, 2018
Congratulations to the Gatsby team for the v2 release!
Ok, so now how the fuck do I upgrade from the v2 beta to the final release? Let’s check the blog.
Hmm… Nope. Nope. Nope. Hmm… Scroollllllllll alllllll the wayyyyyy downnnnnnn.
read read read
Ah! Well, I’m not using npm, but let’s update the global cli via yarn:
engine9:cdgd gabe$ yarn global add --verbose gatsby@latest
yarn global v1.3.2
…
success Installed "gatsby@2.0.3" with binaries:
- gatsby
✨ Done in 26.54s.
engine9:cdgd gabe$
Cool. Ok, let’s update the project too.
engine9:cdgd gabe$ yarn add gatsby@latest
yarn add v1.3.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "gatsby > mini-css-extract-plugin > schema-utils > ajv-errors@1.0.0" has unmet peer dependency "ajv@>=5.0.0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
success Saved 16 new dependencies.
├─ cacache@11.2.0
├─ cssnano@4.1.0
├─ figgy-pudding@3.5.1
├─ gatsby-cli@2.4.1
├─ gatsby-link@2.0.1
├─ gatsby-plugin-page-creator@2.0.0
├─ gatsby-react-router-scroll@2.0.0
├─ gatsby@2.0.3
├─ graphql-skip-limit@2.0.0
├─ last-call-webpack-plugin@3.0.0
├─ mississippi@3.0.0
├─ optimize-css-assets-webpack-plugin@5.0.1
├─ source-map-support@0.5.9
├─ ssri@6.0.1
├─ terser-webpack-plugin@1.1.0
└─ terser@3.8.2
✨ Done in 9.23s.
engine9:cdgd gabe$ yarn
checks package.json
Wait. My package.json still has a bunch of packages references gatsby@next… d’oh!
"dependencies": {
"gatsby": "^2.0.3",
"gatsby-plugin-feed": "next",
"gatsby-plugin-google-analytics": "next",
"gatsby-plugin-manifest": "next",
"gatsby-plugin-offline": "next",
"gatsby-plugin-react-helmet": "next",
"gatsby-plugin-sharp": "next",
"gatsby-plugin-typography": "next",
"gatsby-remark-copy-linked-files": "next",
"gatsby-remark-images": "next",
"gatsby-remark-prismjs": "next",
"gatsby-remark-responsive-iframe": "next",
"gatsby-remark-smartypants": "next",
"gatsby-source-filesystem": "next",
"gatsby-transformer-remark": "next",
"gatsby-transformer-sharp": "next",
Uh… Fuck it. Search & replace.
engine9:cdgd gabe$ yarn
yarn install v1.3.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > eslint-plugin-react@7.11.1" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0".
warning "gatsby > mini-css-extract-plugin > schema-utils > ajv-errors@1.0.0" has unmet peer dependency "ajv@>=5.0.0".
warning " > gatsby-plugin-react-helmet@2.0.11" has incorrect peer dependency "gatsby@^1.0.0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
✨ Done in 28.24s.
engine9:cdgd gabe$
Ok. There. Run gatsby develop
and check it. Looks good.
Commit.
Do your thing, Netlify!