-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Failed to server render when use Slice API #37537
Comments
Hi @junghyeonsu I was able to get same error as reported with your reproduction and will be looking into it. For now I can only explain why it happens on refresh - |
I opened #37542 with the fix (well, adding missing support for slices with DEV_SSR). I did verify that those changes do fix the problem on your repro. Will be looking to get fix approved, merged and released after the weekend |
Thank you very much for your quick response!! 👍 |
Fix published in |
awesome! It works well with |
Preliminary Checks
Description
hello.
I am trying to use the new slice api from the gatsby 5 version, but I get an SSR related error only in the development environment. (It works fine when building and serving.)
I tested the Slice component as a component that just renders text without anything special.
Error Message
Test Slice Component
Usage
I located test slice in
docs/src/pages/component/index.tsx
.gatsby-node
I used the api by referring to the documentation without anything special.
package.json
I use gatsby
5.5.0
versionReproduction Link
https://github.com/daangn/seed-design/tree/chore/slice-api
Steps to Reproduce
yarn install
at project rootyarn build
to build packagescd docs
to move gatsby project folderyarn dev
to start dev serverhttp://localhost:8000/component/
Expected Result
Reload page with no error and we should be able to see the
test
Text.Actual Result
Error occurs when reloading.
Environment
System: OS: macOS 12.6.1 CPU: (10) arm64 Apple M1 Max Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.12.1 - /private/var/folders/vn/kgj9ng916t58xr1nsxyq_64c0000gn/T/xfs-d0b4b9bd/node Yarn: 3.2.2 - /private/var/folders/vn/kgj9ng916t58xr1nsxyq_64c0000gn/T/xfs-d0b4b9bd/yarn npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm Browsers: Chrome: 109.0.5414.119 Safari: 16.1
Config Flags
only
DEV_SSR: true
The text was updated successfully, but these errors were encountered: