Skip to content

Vue Vite plugin is causing type errors #2560

@zugende

Description

@zugende

Environment

  • Operating System: Darwin
  • Node Version: v20.12.0
  • Nuxt Version: - (using vue@latest)
  • CLI Version: 3.15.0
  • Nitro Version: -
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

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 running pnpm build.

👀 Update 15. Nov: Workaround is to disable type-check in your build command

"build": "run-p type-check \"build-only {@}\" --",
✅ "build-only": "vite build",

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3#1289vue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions