Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using DEV_SSR = true #173

Open
danilobuerger opened this issue Sep 13, 2022 · 4 comments
Open

Error when using DEV_SSR = true #173

danilobuerger opened this issue Sep 13, 2022 · 4 comments

Comments

@danilobuerger
Copy link

When enabling DEV_SSR, I am getting the following error:

Failed to Server Render (SSR)
Error message:
TypeError: Cannot read properties of undefined (reading 'type') (from plugin: gatsby-plugin-remove-generator)

File:
node_modules/gatsby-plugin-remove-generator/gatsby-ssr.js:17:24

Stack:
WebpackError: TypeError: Cannot read properties of undefined (reading 'type') (from plugin: gatsby-plugin-remove-generator)
    at node_modules/gatsby-plugin-remove-generator/gatsby-ssr.js:17:24
    at node_modules/gatsby-plugin-remove-generator/gatsby-ssr.js:16:6
    at .cache/api-runner-ssr.js:68:22
    at .cache/api-runner-ssr.js:61:11
    at .cache/ssr-develop-static-entry.js:321:16
    at node_modules/@gatsbyjs/reach-router/es/lib/history.js:63:1
    at .cache/ssr-develop-static-entry.js:334:19

It seems like some of the head components can be undefined and so the error occurs.

@tgallacher
Copy link
Owner

Hey @danilobuerger can you confirm which version of Gatsby and the plugin you have and I can take a look. Thanks!

@danilobuerger
Copy link
Author

@tgallacher
gatsby: 4.23.0
gatsby-plugin-remove-generator: 1.2.0
Thanks for taking a look.

@tj-noor
Copy link

tj-noor commented Mar 17, 2023

Ran into the same issue as well with FAST_DEV, which enables DEV_SSR as well.

gatsby: 4.25.2
gatsby-plugin-remove-generator: 1.2.0

WebpackError: TypeError: Cannot read properties of undefined (reading 'type') (from plugin: gatsby-plugin-remove-generator)
    at autocompanion/node_modules/@mui/material/CardActionArea/CardActionArea.js:102:28
    at autocompanion/node_modules/@mui/material/CardActionArea/CardActionArea.js:102:12
    at autocompanion/node_modules/@mui/base/utils/omitEventHandlers.js:13:1
    at autocompanion/node_modules/@mui/material/TableRow/TableRow.js:76:1
    at autocompanion/node_modules/@emotion/cache/dist/emotion-cache.esm.js:58:1
    at autocompanion/node_modules/@mui/material/TableRow/TableRow.js:88:38

Appreciate your work on this plugin!

@tgallacher
Copy link
Owner

tgallacher commented Mar 17, 2023

I can't seem to reproduce this, with either flag.

If someone can provide steps to reproduce, or create a basic skeleton repo that demonstrates the issue, then I can investigate further 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants