Skip to content
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

Module is causing ERROR with typeschecks enabled #835

Open
sawden opened this issue Jan 4, 2025 · 0 comments
Open

Module is causing ERROR with typeschecks enabled #835

sawden opened this issue Jan 4, 2025 · 0 comments
Labels
type: bug Something isn't working

Comments

@sawden
Copy link
Contributor

sawden commented Jan 4, 2025

Environment

------------------------------
- Operating System: Linux
- Node Version:     v22.12.0
- Nuxt Version:     3.15.0
- CLI Version:      3.17.2
- Nitro Version:    2.10.4
- Package Manager:  [email protected]
- Builder:          -
- User Config:      default
- Runtime Modules:  @nuxtjs/[email protected]
- Build Modules:    -
------------------------------

Reproduction

https://stackblitz.com/edit/github-sp3j7mjs

Describe the bug

When using @nuxtjs/storybook with Nuxt typechecks enabled, the following error appears in the console during npm run dev:

ERROR  Pre-transform error: Failed to resolve import "/_nuxt/@vite-plugin-checker-runtime" from "virtual:@vite-plugin-checker-runtime-entry". Does the file exist?
  Plugin: vite:import-analysis
  File: virtual:@vite-plugin-checker-runtime-entry:2:25
  1  |  
  2  |  import { inject } from "/_nuxt/@vite-plugin-checker-runtime";
     |                          ^
  3  |  inject({
  4  |    overlayConfig: {},

Tested Node versions:

  • 18.20.5
  • 20.18.1
  • 22.12.0 (LTS)

Additional context

Custom Reproduction

Since the StackBlitz console output differs from local environments, please either download the StackBlitz Code or follow these steps to set up a fresh Nuxt app:

  1. Init Nuxt App: npx nuxi@latest init nuxt-app
  2. cd nuxt-app/
  3. Init Storybook: npx storybook@next init
  4. Enable Nuxt typeschecks as described here
    1. npm install --save-dev vue-tsc typescript
    2. Add to nuxt.config.ts:
      export default defineNuxtConfig({
         ...,
         typescript: {
            typeCheck: true,
         },
      });
  5. Run npm run dev
@sawden sawden added the type: bug Something isn't working label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant