statsig-io / statsig-feedback

Issue Tracker for Statsig. Leave your feedback on anything we do!
5 stars 0 forks source link

Statsig in Node.js #29

Open akunap2 opened 1 year ago

akunap2 commented 1 year ago

Hi,

Our backend setup is SST(severlessstack) in NodeJS deployed to AWS Lamnda. We get this error when we try to setup statsig in it - ERROR statsigSDK::sync> Failed while attempting to sync values: fetch is not defined

Can you tell us how to address it please.

tore-statsig commented 1 year ago

Hi - I dont see any error there, did you mean to share something?

akunap2 commented 1 year ago

ERROR statsigSDK::sync> Failed while attempting to sync values: fetch is not defined

tore-statsig commented 1 year ago

What version of node are you using? Can you try using Node 18?

tore-statsig commented 1 year ago

I think another workaround would be to use node-fetch. https://stackoverflow.com/questions/48433783/referenceerror-fetch-is-not-defined