Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/using-mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Gatsby example site using gatsby-source-mongodb",
"author": "[email protected]",
"dependencies": {
"gatsby": "^2.0.0",
"gatsby": "^5.14.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading Gatsby from v2 to v5 is a major change that introduces many breaking changes. This upgrade alone will break the example project because other dependencies are no longer compatible. To fix this, you'll need to update several other packages.

Here are the required changes:

  • React & React-DOM: Gatsby v5 requires React 18. You need to upgrade react and react-dom from ^16.4.1 to a compatible version, like ^18.2.0.
  • Gatsby Plugins: The Gatsby plugins in this project are outdated and incompatible with Gatsby v5.
    • gatsby-plugin-react-helmet (^3.0.0) and react-helmet (^5.2.0) are deprecated. Gatsby v4 introduced a built-in Head API for managing the document head. These dependencies should be removed, and the components should be updated to use the new API.
    • gatsby-source-mongodb (^2.0.5) should be updated to a version compatible with Gatsby v5, for example, ^5.7.0.
    • gatsby-transformer-remark (^2.1.1) should be updated to a version compatible with Gatsby v5, for example, ^6.13.1.

Without these additional updates, the project will fail to build and run. This is a critical issue that needs to be addressed before merging.

"gatsby-plugin-react-helmet": "^3.0.0",
"gatsby-source-mongodb": "^2.0.5",
"gatsby-transformer-remark": "^2.1.1",
Expand Down