Skip to content

Conversation

admirsaheta
Copy link
Contributor

WHY are these changes introduced?

Fixes #2289

The previous implementation used a mutable export (export let) which is not compatible with Nuxt's SSR and module system. This caused runtime errors and unexpected behavior during build or execution in Nuxt 3.

WHAT is this pull request doing?

Refactors the abstractRuntimeString logic to avoid mutable exports, replacing it with an internal variable and accessor functions:

  • Introduces a private _abstractRuntimeString variable.
  • Adds getAbstractRuntimeString() and setAbstractRuntimeString() functions to safely access and mutate the value.
  • Ensures compatibility with Nuxt's Vite/Nitro SSR context.

No functional changes are introduced—just an implementation-level fix for compatibility and stability.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • [] I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@admirsaheta admirsaheta requested a review from a team as a code owner May 20, 2025 16:32
@lizkenyon
Copy link
Contributor

Hi @admirsaheta

Could you provide example code repo to reproduce the error?

@admirsaheta
Copy link
Contributor Author

Hey @lizkenyon

You can find the reproduction repository here along with instructions on how to achieve the issue reproduction. 🥇

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 3.16 - Missing adapter implementation for 'abstractRuntimeString' - make sure to import the appropriate adapter for your platform

2 participants