-
Notifications
You must be signed in to change notification settings - Fork 764
Vue Vite plugin is causing type errors #2560
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
Comments
We're still trying to figure that out! You can disable |
I think you could remove the |
You may use |
@antfu the issue still occurs even with this change. I also explicitly node_modules |
Hello!
EDIT: EDIT2: Thank you for your time. |
I am also seeing this issue. I couldn't properly nail down the cause, and adding
to my Some info for reproducing this:
This is the error I get
Would love to be able to use NuxtUI from a Vue.js app! 😊 |
I'm using a nuxt project I created from the default template, however I get a similar error. I am unable to both run the development server or build the site for production without it erroring out. Here are my configuration files: File: nuxt.config.ts// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'@nuxt/eslint',
'@nuxt/ui'
],
ssr: false,
css: [ '~/assets/css/main.css' ],
spaLoadingTemplate: false,
srcDir: 'src/',
compatibilityDate: '2024-11-01',
typescript: {
typeCheck: true
},
eslint: {
config: {
stylistic: true
}
}
}) File: app.config.tsexport default defineAppConfig({
ui: {
primary: 'blue',
secondary: 'sky',
info: 'indigo',
warning: 'teal',
neutral: 'gray'
}
}) File: package.json{
"name": "project",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"eslint": "eslint"
},
"dependencies": {
"@highlightjs/vue-plugin": "^2.1.0",
"@nuxt/ui": "3.0.2",
"highlight.js": "^11.11.1",
"mitt": "^3.0.1",
"nanoid": "^5.1.5",
"nuxt": "^3.16.1",
"tailwindcss": "^4.0.17",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@nuxt/eslint": "1.3.0",
"@types/node": "^22.13.14",
"eslint": "^9.23.0",
"typescript": "^5.8.2",
"vue-tsc": "^2.2.8"
},
"packageManager": "[email protected]+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6",
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"esbuild",
"vue-demi"
]
}
} And here's the errors I get: While running "nuxi dev"
While running "nuxi generate"
|
Look's like there's a fix coming in #2625 ? |
With latest d3df3bb commit ( |
I can successfully run
Thanks so much! Out of interest (if you have the time), what was the fix? |
It was multiple things but to summarize:
|
@benjamincanac is there an ETA for the next released version that will include the fixes for this? |
Nuxt UI 3.1.1 should have the fix, if I understand correctly. It resolved it for me! If you still have problems, perhaps it's a different issue? |
As soon as I start the dev server (I cleared node_modules and .nuxt already), I get the following output.
For context, here are my npm dependencies: Dependencies:
- "@highlightjs/vue-plugin": "^2.1.0",
- "@nuxt/ui": "3.1.1",
- "highlight.js": "^11.11.1",
- "mitt": "^3.0.1",
- "nanoid": "^5.1.5",
- "nuxt": "^3.17.2",
- "tailwindcss": "^4.1.6",
- "vue": "^3.5.13",
- "vue-router": "^4.5.1"
Dev Dependencies:
- "@nuxt/eslint": "1.3.0",
- "@types/node": "^22.15.17",
- "eslint": "^9.26.0",
- "typescript": "^5.8.3",
- "vue-tsc": "^2.2.10" |
@SoCuul It looks like you're using Nuxt UI with Nuxt. Are you sure you need Nuxt in your dependencies? In my understanding, this issue only happened when using Nuxt UI without Nuxt. |
Oh, I didn't even realize that until now. But it was the same exact error with nuxt ui, so it seemed like the best place to ask questions. |
I'm getting this error using Nuxt and Nuxt UI Pro, all the latest versions
|
Uh oh!
There was an error while loading. Please reload this page.
Environment
Version
v3.0.0-alpha.8
Reproduction
https://github.com/zugende/nuxt-ui-type-error-repro
Description
When creating a fresh standalone Vue app using
pnpm create vue@latest
and then installing nuxt/ui by following the instructions here: https://ui3.nuxt.dev/getting-started/installation/vue one get type errors during the build process runningpnpm build
.👀 Update 15. Nov: Workaround is to disable type-check in your build command
Additional context
No response
Logs
// more than 160 errors (shortened)
node_modules/.pnpm/@nuxt+ui@3.0.0-alpha.8_@babel[email protected][email protected]_rollup@[email protected]_yljlai3w6pxxgcxew5prmihdom/node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:5:24 - error TS2307: Cannot find module '#build/app.config' or its corresponding type declarations.
5 import _appConfig from '#build/app.config'
~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@nuxt+ui@3.0.0-alpha.8_@babel[email protected][email protected]_rollup@[email protected]_yljlai3w6pxxgcxew5prmihdom/node_modules/@nuxt/ui/dist/runtime/components/Textarea.vue:4:24 - error TS2307: Cannot find module '#build/app.config' or its corresponding type declarations.
4 import _appConfig from '#build/app.config'
~~~~~~~~~~~~~~~~~~~
[.....]
Found 165 errors.
The text was updated successfully, but these errors were encountered: