Netlify + Sentry node-fetch errors

Hi,

We are trying to set up Sentry with Netlify and followed the guide at Sentry Integration | Netlify Docs

So far out of the box, after configuring everything and copying the code for a function with Sentry integration, we can’t get it to work, and get this error when building:

image

image

The SENTRY_DSN is set in .env variable. Tried with different node-fetch versions as well
It doesn’t come from anything else, if I remove the function deployment works as normal, leading me to think it’s something related to the integration with Sentry, but couldn’t find anything related to this at all.

The error is not fully consistent, sometimes it’s “Can’t resolve node:https” or “Can’t resolve node:zlib”

Has anyone experienced something like this?

netlify-lambda is long dead and deprecated. Please don’t use it. CLI should be able to build functions automatically.