Skip to content

fix(nuxt): Remove @opentelemetry/resources dev alias - #25216

Merged
chargome merged 3 commits into
developfrom
fix-nuxt-relative-paths
Oct 9, 2026
Merged

chargome merged 3 commits into
developfrom
fix-nuxt-relative-paths

Conversation

@chargome

@chargome chargome commented Oct 9, 2026

Copy link
Copy Markdown
Member

In dev mode the Nuxt module aliased @opentelemetry/resources to @opentelemetry/resources/build/src/index.js. Nuxt writes every alias into the paths of the generated .nuxt/tsconfig.*.json files. Those configs have no baseUrl, so with typescript: { typeCheck: true } vue-tsc fails with TS5090 ("Non-relative paths are not allowed when 'baseUrl' is not set").

The alias was a workaround for incomplete ESM imports in @opentelemetry/resources (#15204). In v11 nothing in the Nuxt SDK's dependency tree uses that package anymore, so the alias can be removed instead of rewritten.

Fixes #25188

The alias ended up in the generated .nuxt tsconfig paths as a non-relative
path, which vue-tsc rejects when typeCheck is enabled. Nothing in the Nuxt
SDK's dependency tree uses @opentelemetry/resources anymore, so the alias is
no longer needed.

Fixes #25188
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome chargome self-assigned this Oct 9, 2026
@chargome

chargome commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/nuxt/src/module.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome

chargome commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 54e7000. Configure here.

@chargome
chargome marked this pull request as ready for review October 9, 2026 10:15
@chargome
chargome requested a review from a team as a code owner October 9, 2026 10:15
@chargome
chargome requested review from nicohrubec and s1gr1d and removed request for a team October 9, 2026 10:15

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Comment thread packages/nuxt/test/module.test.ts Outdated
@@ -0,0 +1,40 @@
import type { Nuxt } from '@nuxt/schema';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: don't think we need this test? a lot of mocking to test a deleted code path, I'd just get rid of this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

The test mocks most of module setup just to cover a deleted code path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome
chargome enabled auto-merge (squash) October 9, 2026 10:30
@chargome
chargome merged commit 4132a34 into develop Oct 9, 2026
357 of 359 checks passed
@chargome
chargome deleted the fix-nuxt-relative-paths branch October 9, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Nuxt] 'Non-relative paths are not allowed when baseUrl is not set' from @opentelemetry/resources alias

2 participants