Skip to content

TypeError when Setting Up Vitest #3213

Open
@brenodanyel

Description

Environment


  • Operating System: Linux
  • Node Version: v20.17.0
  • Nuxt Version: -
  • CLI Version: 3.21.1
  • Nitro Version: -
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Version

3.0.0-alpha.10

Reproduction

  • Start a new project with the starter CLI:
    npx nuxi init -t github:nuxtlabs/nuxt-ui3-vue-starter test-app

  • Install vitest and vue test-utils
    bun add -D vitest @vue/test-utils

  • Add test script to package.json
    "test": "vitest"

  • Run the test script

Description

I'm encountering a TypeError while trying to set up Vitest in my project (Vue). The error message is as follows:

TypeError: Package import specifier "#imports" is not defined in package 
/home/xxxx/test-app/node_modules/@nuxt/ui/package.json imported from 
/home/xxxx/test-app/node_modules/@nuxt/ui/dist/runtime/composables/useComponentIcons.js

Additional context

No response

Logs

TypeError: Package import specifier "#imports" is not defined in package /home/xxxx/test-app/node_modules/@nuxt/ui/package.json imported from /home/xxxx/test-app/node_modules/@nuxt/ui/dist/runtime/composables/useComponentIcons.js

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions