diff --git a/e2e-tests/mdx/package.json b/e2e-tests/mdx/package.json
index d5bcd53f4c59e..626da5407b20d 100644
--- a/e2e-tests/mdx/package.json
+++ b/e2e-tests/mdx/package.json
@@ -6,8 +6,8 @@
     "@mdx-js/mdx": "^1.6.6",
     "@mdx-js/react": "^1.6.6",
     "cypress": "^3.1.0",
-    "gatsby": "^2.0.118",
-    "gatsby-plugin-mdx": "^1.2.19",
+    "gatsby": "^5.0.0",
+    "gatsby-plugin-mdx": "^5.10.0",
     "gatsby-source-filesystem": "^2.3.14",
     "react": "^16.8.0",
     "react-dom": "^16.8.0",