-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
I'm using @sentry/[email protected] (docs) with Netlify Functions (@netlify). It works great when deployed to Netlify, however when running locally with > netlify dev it fails with the following error:
{"errorMessage":"Cannot find module 'aws-sdk/global'\nRequire stack:\n- C:\Users...
Simple workaround incase others run into the issue:
const Sentry = require("@sentry/serverless");
if (process.env.NETLIFY_DEV === "true") {
Sentry.init(settings);
} else {
Sentry.AWSLambda.init(settings);
}On a side note, the Sentry.AWSLambda.wrapHandler works fine with Netlify dev.