Skip to content

The requested module '/_nuxt/composables/x.ts?t=1772618481096' does not provide an export named 'xx' (at xxx.ts) #34432

Description

@yk-eta

Environment

| Node.js version | v22.14.0 |
| nuxt/cli version | 3.33.1 |
| Package manager | npm@10.9.2 |
| Nuxt version | 4.3.1 |
| Nitro version | 2.13.1 |
| Builder | vite@7.3.1 |
| Config | app, build, compatibilityDate, css, devServer, gtag, hooks, modules, routeRules, router, runtimeConfig, ssr, webpack |
| Modules | @pinia/nuxt@0.11.3, @nuxtjs/device@3.2.4, nuxt-gtag@4.1.0, nuxt-swiper@2.0.1, @nuxt/ui@4.5.1 |

Reproduction

// models/test.ts
export default class Test {
  // variable named same with composables exported function variable name
  xx
}

// composables
composables/x.ts
export const something = (xx: any) => {
  //doSomething
}

// generated test.ts?t=1772618481096
import {xx} from "/_nuxt/composables/x.ts?t=1772618481096";
export default class Test {
  // variable named same with composables exported function variable name
  xx
}

Describe the bug

after update with npm
The requested module '/_nuxt/composables/x.ts?t=1772618481096' does not provide an export named 'xx' (at xxx.ts)
error is fired on local, when I check the source file, the x.ts?t=1772618481096 inserted a new import line that try to import undefined variable from composables with the same named variable in the model file default class

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions