Repository navigation
Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
8.1.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
- Load the lambda layer 241 and initialize as documented
-r @sentry/aws-serverless/awslambda-auto
Apparently, although the dependencies are correctly stated in the package.json of the @sentry/aws-serverless package, the lambda layer bundle only contains the @sentry/aws-serverless package with no dependencies from it.
Expected Result
The lambda is initialized and instrumented correctly
Actual Result
node:internal/modules/cjs/loader:1031
--
throw err;
^
Error: Cannot find module '@sentry/node'
Require stack:
- /opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js
- internal/preload
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js:1:14)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at internalRequire (node:internal/modules/cjs/loader:169:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js',
'internal/preload'
]
}
Metadata
Metadata
Assignees
Labels
No labels
Projects
- StatusShow more project fieldsNo status
Activity
Lms24 commentedon May 16, 2024
Hey @JoaquinFernandez thanks for writing in and reporting! We identified and fixed the issue in #12083. We're releasing 8.2.0 right now but will right after that release
8.2.1which will include this fix.Sorry for the inconvenience!
Your issue btw also served as a reminder that we need to isolate future v7 layer releases to not release under the same AWS lambda layer name. Otherwise we'd break v8 users. We'll also follow up with this a bit later.
fix(aws-serverless): Fix build of lambda layer (#12083)