-
Notifications
You must be signed in to change notification settings - Fork 713
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": "pnpm@10.7.0+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 ? |
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+parser@7.26.2_embla-carousel@8.3.1_rollup@4.24.4_typescript@5.6_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+parser@7.26.2_embla-carousel@8.3.1_rollup@4.24.4_typescript@5.6_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: