Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-transform error in UApp #3609

Closed
rotsee opened this issue Mar 18, 2025 · 10 comments
Closed

Pre-transform error in UApp #3609

rotsee opened this issue Mar 18, 2025 · 10 comments
Labels
bug Something isn't working needs reproduction v3 #1289

Comments

@rotsee
Copy link

rotsee commented Mar 18, 2025

Environment

  • Operating System: Linux
  • Node Version: v22.11.0
  • Nuxt Version: 3.16.0
  • CLI Version: 3.22.5
  • Nitro Version: 2.11.5
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, css, compatibilityDate, future, routeRules, devtools
  • Runtime Modules: @nuxt/[email protected], @nuxt/[email protected]
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0 and v3.0.1

Description

After upgrading to NuxtUI 3 as per https://ui.nuxt.com/getting-started/migration, I get the following error message when running either npx run dev, npx run build or npx run generate, that seems to come from UApp(?):

I have tried removing node_modules/* and package-lock.json and make a clean install. Didn't change anything.


 ERROR  Pre-transform error: [@vue/compiler-sfc] Failed to resolve extends base type.          10:10:44 PM
If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example:

interface Props extends /* @vue-ignore */ Base {}

Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.

<~>/node_modules/@nuxt/ui/dist/runtime/components/App.vue
22 |  import { ConfigProvider, TooltipProvider, useForwardProps } from 'reka-ui'
23 |  import { reactivePick } from '@vueuse/core'
24 |  import { localeContextInjectionKey } from '../composables/useLocale'
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 |  import UToaster from './Toaster.vue'
   |  ^^^^^^^^^^^^^^^^^^^^^^^
26 |  import UOverlayProvider from './OverlayProvider.vue'

Additional context

Full package.json

{
  "name": "test",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "dependencies": {
    "@nuxt/ui": "3.0.1",
    "nuxt": "3.16.1"
  }
}

nuxt.config.ts:

export default defineNuxtConfig({
  modules: [ '@nuxt/ui' ],
  css: [ '~/assets/css/main.css' ],
  compatibilityDate: '2025-03-19',
})

Logs

@rotsee rotsee added bug Something isn't working triage v3 #1289 labels Mar 18, 2025
@noopurphalak
Copy link

noopurphalak commented Mar 20, 2025

Any update on this? getting the same error even after starting the fresh project.

Copy link
Member

As always a reproduction is required, we cannot help you otherwise. You could have the wrong version in your lockfile, using an old nuxt or vue version, etc. I cannot know.

@rotsee
Copy link
Author

rotsee commented Mar 22, 2025

I have managed to narrow this bug down a bit. It happens on both new and migrated projects, if there is a non-ascii(?) character in the path! At the very least an å or ö in the path triggers this error (could be in the name of the current folder, or higher up)

Copy link
Member

Did you try to install typescript as dev dependency?

@benjamincanac benjamincanac removed the triage label Mar 22, 2025 — with Volta.net
Copy link
Member

I've tried the most minimal app with both npm and pnpm without being able to reproduce. I won't be able to do anything more without a reproduction as mentioned above.

@noopurphalak
Copy link

Did you try to install typescript as dev dependency?

Wouldn't it work with a javascript based vue project?

Copy link
Member

No typescript is required to use @nuxt/ui

@noopurphalak
Copy link

No typescript is required to use @nuxt/ui

Is there any plan to make it work with Javascript based Vue or Nuxt projects?

Copy link
Member

Not really no, this doesn't mean you have to use lang="ts" in your project, you can just use JavaScript.

Did it fix your issue?

@noopurphalak
Copy link

Not really no, this doesn't mean you have to use lang="ts" in your project, you can just use JavaScript.

Did it fix your issue?

Okay, got it. Yes, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction v3 #1289
Projects
None yet
Development

No branches or pull requests

3 participants