Skip to content

[Nuxt] Issues with imports in build output (OTel deps, Nitro chunk etc) #16445

@s1gr1d

Description

@s1gr1d

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


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.

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions