module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

auto import failing when using my module deployed on npm

Open fusionbeam opened this issue 3 months ago • 0 comments

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

fusionbeam avatar Sep 25 '25 14:09 fusionbeam