Open philschonholzer opened 2 years ago
If I open the root url localhost:8000/ the gatsby dev server will crash if SSR is enabled.
localhost:8000/
If SSR is not enabled or I enter localhost:8000/de/ it will not crash.
localhost:8000/de/
Cannot read property 'matchPath' of undefined TypeError: Cannot read property 'matchPath' of undefined - render-dev-html.ts:181 [gcb-shop]/[gatsby]/src/utils/dev-ssr/render-dev-html.ts:181:17 - new Promise - render-dev-html.ts:171 renderDevHTML [gcb-shop]/[gatsby]/src/utils/dev-ssr/render-dev-html.ts:171:3 - start-server.ts:732 [gcb-shop]/[gatsby]/src/utils/start-server.ts:732:40
./locale/config.json
[ { "code": "de", "hrefLang": "de-CH", "name": "German", "localName": "Deutsch", "langDir": "ltr", "dateFormat": "DD.MM.YYYY" }, { "code": "fr", "hrefLang": "fr-CH", "name": "French", "localName": "Francaise", "langDir": "ltr", "dateFormat": "DD.MM.YYYY" }, { "code": "en", "hrefLang": "en-US", "name": "English", "localName": "English", "langDir": "ltr", "dateFormat": "MM/DD/YYYY" } ]
gatsby-config.js
//... { resolve: `gatsby-theme-i18n-lingui`, options: { localeDir: `./locale`, }, }, { resolve: `gatsby-theme-i18n`, options: { defaultLang: 'de', configPath: require.resolve(`./locale/config.json`), }, }, // ...
package.json
"gatsby": "^3.14.0", "gatsby-theme-i18n": "^2.0.0", "gatsby-theme-i18n-lingui": "^2.0.0",
If I open the root url
localhost:8000/
the gatsby dev server will crash if SSR is enabled.If SSR is not enabled or I enter
localhost:8000/de/
it will not crash../locale/config.json
gatsby-config.js
package.json