gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.

Home Page:https://www.gatsbyjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

matchPath seems to be broken since adapters

laurenskling opened this issue · comments

Preliminary Checks

Description

No boom:
https://feature-back-to-5-11--abmulderbv.netlify.app/searchagent/unsubscribe/354689y324985674398752348/email@example.com

Boom:
https://abmulderbv.netlify.app/searchagent/unsubscribe/354689y324985674398752348/email@example.com
(before hydration, you see the page working correctly from SSR)

Building the site locally and running serve it works as well on 5.13

I create the page like:

    createPage({
      path: `${searchagentPage.slug}/unsubscribe`,
      matchPath: `${searchagentPage.slug}/unsubscribe/:id/:email`,
      component: unsubscribeTemplate,
      context: {
        id: searchagentPage.id,
      },
    });

I just now realised it doesn't work anymore. It must be since adapters in 5.12

Reproduction Link

x

Steps to Reproduce

  1. have a matchPath created page.
  2. go to it.
  3. see it go boom.
    ...

Expected Result

No boom.

Actual Result

boom.

Environment

System:
    OS: macOS 13.6.1
    CPU: (8) arm64 Apple M2
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.1 - /var/folders/50/3fndm5d13gs_kr96nwxpxd9c0000gn/T/yarn--1709413201340-0.6552245016050171/node
    Yarn: 1.22.19 - /var/folders/50/3fndm5d13gs_kr96nwxpxd9c0000gn/T/yarn--1709413201340-0.6552245016050171/yarn
    npm: 10.2.4 - /usr/local/bin/npm
  Languages:
    Python: 3.10.9 - /usr/local/bin/python
  Browsers:
    Chrome: 122.0.6261.94
    Safari: 17.1

Config Flags

No response