Gatsby Server Rendering API does not work in neither Netlify nor Vercel #39225
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
I am currently building a simple blog with Gatsby using MDX. In local, everything runs fine. In production, there is no installation or building errors on both platforms. However, both crashes when navigating to a SSR page (using
getServerData
).In Netlify, it provides an error about the installing and building
sharp
module. This only happens during runtime when navigating to the SSR page, not during dependency installation.After searching on the internet, Netlify states its limitation that
gatsby-transformer-sharp
does not run properly during SSR environment in Netlify. So, I switched to hosting my images on Cloudinary as suggested. It does not work. The page still crashes with the same error even though I don't use any official image plugins from GatsbyJSI thought it might be a problem from Netlify so I switched to Vercel with the same app source, including Cloudinary image service. Vercel is enable to render some first visits. But after an arbitrary amount of visits, it will crash and give a different error.
I've been stuck to this SSR page like forever so any help would be great.
Reproduction Link
https://github.com/richardnguyen99/gatsby-mdx-blog-template
Steps to Reproduce
Expected Result
Expect the SSR APIs to work on major hosting services for GatsbyJS
Actual Result
Get crashes with two different errors using the same app source.
Environment
Config Flags
DEV_SSR: true
The text was updated successfully, but these errors were encountered: