-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
In most cases, the way a Nuxt application and the Sentry configuration is built does not create problems. However, there are some edge cases that pop up from time to time and also seem very hard to reproduce.
Issue List
- Nuxt: Cannot find module: node_modules\@opentelemetry\resources\build\esm\detectors\platform\node\machine-id\execAsync #15204
@sentry/nuxtis not included in the build outputnode_modules#17224
Those are some insights I gained so far while digging into build-folder related topics:
1. @sentry/nuxt is not included in the build output node_modules
Described in this issue: #17224
2. sentry.server.config.mjs includes imports that should not be there
When using yarn, there is an import from './chunks/nitro/nitro.mjs'; inside sentry.server.config.mjs which breaks the early-import of the SDK. It only happens when using Nuxt v3, setting a srcDir without compatibilityVersion: 4. It's no problem in Nuxt v4.
2.1. sentry.server.config.mjs bundles in OTel imports
This already happened but I am not able to reproduce this myself anymore. At some point, the sentry.server.config.mjs file in the build output bundles in all of @opentelemetry/... imports and the file gets super long.