GatsbyJs SSR rendering strategy, to set usersAttribute

I’m trying to use Gatsby SSR with builder to set the userAttributes. When I serve my build locally it works but is not working on Gatsby Cloud, this is the error that I’m getting.

Hello @adonis17,

Can you try to resolve the initial error about node-fetch is not installed?

Install it in your Node application like this

npm install node-fetch

@manish-sharma, thank you so much for the fast response. The node-fetch error is coming from @builder.io/gatsby, I already try installing node-fetch but didn’t work.

Hi @adonis17,

Are you able to build the Gatsby app locally?

@manish-sharma yes locally, it works but once I deploy it to gatsby cloud it does not

the main reason of why we are using SSR in gatsby is so we can utilize the custom targeting properties that we can add in builder.

Hello @adonis17,

We understand your concerns, however, this looks like more of an issue from the Gatsby cloud, we will need to reproduce this issue on our end to offer you any possible solution, can you confirm which Gatsby version are you using currently?

Hi @manish-sharma
I’m using gatsby=“^4.24.8”

Thanks for confirming that, we will try to reproduce this possible issue and get back to you with an update as soon as possible. Meanwhile, if you wish, you could try deploying a test Gatsby app without builder and see how that works. Thank you!

@manish-sharma thank you so much for your help, I really appreciate it🙏🏽

Hello @adonis17,

Just wanted to update you on this, we are able to reproduce the issue with SSR rendering when deployed on the Gatsby cloud, and we are further investigating this to deploy a possible fix as soon as possible. I’ll be sure to keep you updated on this. Thank you!

@manish-sharma Thank you so much! I will also keep you updated if anything changes.

@manish-sharma I got it working and the problem was the node version, when we want to use Gatsby SSR with Builder, the node version should be >= 18.17.0

Hello @adonis17,

That’s excellent, we are really glad to hear that. Thanks for sharing the solution.

@manish-sharma Any time :sunglasses: