NuxtN
Nuxt2y ago
Flo

Nuxt Layer: Composable from layer not found

Following directory structure:
/workspaces
  /project
    /app (the main nuxt app)
      /server
        /api
          /someHandler.get.ts (I want to use useK8s here)
    /auth (a layer)
    /k8s (another layer)
      /composables
        /k8s.ts (contains an exported function called useK8s)


For unknown reason, I can't use useK8s in someHandler.get.ts. Nuxt complains: ERROR [nuxt] [request error] [unhandled] [500] useK8s is not defined .
Yet my app/.nuxt/imports.d.ts contains export { useK8s } from '../../k8s/composables/k8s';
Was this page helpful?