Skip to content

auto import failing when using my module deployed on npm #674

Description

@fusionbeam

Hi,

I've created a custom module that has a few composeables.
When I use the module installed via npmjs I get errors of undefined on pretty much all nuxt utilities (useRuntimeConfig, defineNuxtPlugin etc).
When I use the module locally with link it works fine.

Doesn't seem to be a build/package problem; I get no errors if I use explicit imports in the module composeables

Using:

  • node v22.19.0
  • nuxt 4.1 (same happens on 3.17)
  • pnpm (same problem with yarn)

Any idea why this might happen, how to troubleshoot ? I'll gladly submit a fix, just somewhat new to nuxt modules and need a bit of guidance on where to start ...

Thank you,
Rares

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions