UnRunDead
UnRunDead
NNuxt
Created by UnRunDead on 11/9/2024 in #❓・help
nuxt/ui: Pre-transform error: [@vue/compiler-sfc] Failed to resolve extends base type.
Since updating to the latest macOS Version (macOS 15.1 (24B83)) there are random errors across some of my projects which uses nuxt/ui. Does anyone have similar issues?
npm run dev

> dev
> nuxt dev

Nuxt 3.14.159 with Nitro 2.10.4 15:11:54
15:11:54
Local: http://localhost:3000/
Network: use --host to expose

DevTools: press Shift + Option + D in the browser (v1.6.0) 15:11:55

ℹ Nuxt Icon server bundle mode is set to local 15:11:56
✔ Nuxt Icon discovered local-installed 1 collections: heroicons 15:11:57
✔ Vite client built in 29ms 15:11:58

ERROR Pre-transform error: [@vue/compiler-sfc] Failed to resolve extends base type. 15:11:58
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.

/Users/pj/node_modules/@nuxt/ui/dist/runtime/components/Button.vue
62 |
63 | const loadingAutoState = ref(false)
64 | const formLoading = inject<Ref<boolean> | undefined>(formLoadingInjectionKey, undefined)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65 |
66 | async function onClickWrapper(event: MouseEvent) {

✔ Vite server built in 480ms 15:11:58
✔ Nuxt Nitro server built in 908 ms
npm run dev

> dev
> nuxt dev

Nuxt 3.14.159 with Nitro 2.10.4 15:11:54
15:11:54
Local: http://localhost:3000/
Network: use --host to expose

DevTools: press Shift + Option + D in the browser (v1.6.0) 15:11:55

ℹ Nuxt Icon server bundle mode is set to local 15:11:56
✔ Nuxt Icon discovered local-installed 1 collections: heroicons 15:11:57
✔ Vite client built in 29ms 15:11:58

ERROR Pre-transform error: [@vue/compiler-sfc] Failed to resolve extends base type. 15:11:58
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.

/Users/pj/node_modules/@nuxt/ui/dist/runtime/components/Button.vue
62 |
63 | const loadingAutoState = ref(false)
64 | const formLoading = inject<Ref<boolean> | undefined>(formLoadingInjectionKey, undefined)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65 |
66 | async function onClickWrapper(event: MouseEvent) {

✔ Vite server built in 480ms 15:11:58
✔ Nuxt Nitro server built in 908 ms
I updated my node and npm version to be sure
node -v
v22.11.0

npm -v
10.9.0
node -v
v22.11.0

npm -v
10.9.0
The issue exists in nuxt ui v2, v3 and can be reproduced with a plain new project: npx nuxi init -t ui frontend
10 replies
NNuxt
Created by UnRunDead on 10/31/2024 in #❓・help
How to use nitro types
I setuped a basic nuxt app witht the default folder structure, so the server folder contains a tsconfig.json with
{
"extends": "../.nuxt/tsconfig.server.json"
}
{
"extends": "../.nuxt/tsconfig.server.json"
}
I am using websockets for communication but there is a typescript error
// Cannot find name 'Peer'.ts(2304)
// Cannot find name 'Message'.ts(2304)
export default function onCreateGame(peer: Peer, message: Message) {
}
// Cannot find name 'Peer'.ts(2304)
// Cannot find name 'Message'.ts(2304)
export default function onCreateGame(peer: Peer, message: Message) {
}
Where should I import them from?
13 replies
NNuxt
Created by UnRunDead on 7/12/2023 in #❓・help
Can't access cookie, returning undefined
No description
6 replies
NNuxt
Created by UnRunDead on 1/17/2023 in #❓・help
500 [vite-node] [VITE_ERROR] ....entry.mjs
No description
5 replies