Closed alvarlagerlof closed 11 months ago
Hey there, we have plans to remove the node forge dependency. I think that should resolve all the warnings you are seeing. @daniel-statsig
Looking at our logs again, #31 seems to have reduced it to just one type of error:
TypeError: setTimeout(...).unref is not a function
at (../node_modules/statsig-node/dist/utils/StatsigFetcher.js:97:24)
at (../node_modules/statsig-node/dist/utils/StatsigFetcher.js:92:15)
at (../node_modules/statsig-node/dist/utils/StatsigFetcher.js:71:29)
at (src/utils/statsigUtils.ts:83:2)
at (src/middleware.ts:62:6)
at (../node_modules/@sentry/nextjs/esm/edge/utils/edgeWrapperUtils.js:53:28)
at (../node_modules/next/dist/esm/server/web/adapter.js:160:19)
It doesn't break the site site, but it would be great if that one could be resolved as well so that we can have clean logs again.
Bump.
Hey @alvarlagerlof, closing this out as it should be resolved as of v5.9.3 commit: https://github.com/statsig-io/node-js-server-sdk/commit/894f7d291a9d0391ba2d62c09e1fedecc252467f
I noticed that running there are some errors being logged in Vercel when running Statsig on their middleware. I think this happens because the sdk uses Node.js specific APIs might not be available on the Vercel edge runtime. This confused me because
Vercel has an example using Statsig in middleware
.The errors do not seem to affect the function of the SDK, and the errors seem to be handled, but I wonder if this should to be considered anyways.
Screenshot from Vercel
Excerpt of
next build
Versions
Node: 18.16.0 Next.js: 13.4.2 statsig-node: 5.5.0 statsig-node-vercel: 0.1.0
Code sample
This runs in
middleware.ts