You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use Nuxt with Sentry in Netlify. I followed all the steps in the doc and managed to integrate Sentry when Nuxt is built with the node preset.
The issue comes when Nuxt is built with the Netlify preset which creates a lambda function bundled in a single JS file.
No matter what I try, the Netlify function will only contain a single server.js file and the instrument.server.mjs will not be there
PS. Adding the --import flag to the NODE_OPTIONS env variable works and Netlify tries to load the file, but the file is not uploaded.
Expected Result
The instrument.server.mjs is uploaded in Netlify and somehow loaded using --import or NODE_OPTIONS
Actual Result
The lambda function directory contains only the bundled Nuxt code and instrument.server.mjs is missing
I am facing the same issue. Following the SDK docs to set up sentry and then running pnpm run build --preset netlify in a nuxt project outputs two directories:
.netlify/functions-internal/server which is the server lambda. instrument.server.mjs does not get included here, and therefore can't be imported with the NODE_OPTIONS env var.
dist which includes the server folder. instrument.server.mjs gets copied here from the public folder, but that is not helpful.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nuxt
SDK Version
8.28.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
I am trying to use Nuxt with Sentry in Netlify. I followed all the steps in the doc and managed to integrate Sentry when Nuxt is built with the
node
preset.The issue comes when Nuxt is built with the Netlify preset which creates a lambda function bundled in a single JS file.
No matter what I try, the Netlify function will only contain a single
server.js
file and theinstrument.server.mjs
will not be therePS. Adding the
--import
flag to theNODE_OPTIONS
env variable works and Netlify tries to load the file, but the file is not uploaded.Expected Result
The
instrument.server.mjs
is uploaded in Netlify and somehow loaded using--import
orNODE_OPTIONS
Actual Result
The lambda function directory contains only the bundled Nuxt code and
instrument.server.mjs
is missingRelated discussion
The text was updated successfully, but these errors were encountered: