Skip to content

🐞 NuxtHub 0.10.5: server/db/schema imports break when using #shared alias #800

@mrkaashee

Description

@mrkaashee

πŸ› Description

After upgrading from @nuxthub/[email protected] to 0.10.5, imports inside
server/db/schema stopped working when using the #shared Nuxt alias.

βœ… What worked before (0.10.4)

Imports like the following worked correctly:

import { something } from '#shared/utils/accounts'

❌ What happens in 0.10.5

At runtime, Node throws the following error:

Package import specifier "#shared/utils/accounts" is not defined in package
.../node_modules/@nuxthub/db/package.json

πŸ” Observation

This appears to be a behavior change compared to 0.10.4.
Schema imports now rely on Node-only module resolution.

πŸ’‘ Expected behavior / suggestion

Either:

  • πŸ“˜ Document clearly that server/db/schema must not rely on the #shared
    alias and should use Node-resolvable imports, or

  • πŸ”§ Preserve #shared alias resolution for schema imports if possible.

Happy to adjust code β€” just wanted to report this since it wasn’t obvious
during the upgrade πŸ™

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions