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

[Bug]: Failed to resolve import #28342

Open
kxhcfk opened this issue Jun 25, 2024 · 0 comments
Open

[Bug]: Failed to resolve import #28342

kxhcfk opened this issue Jun 25, 2024 · 0 comments

Comments

@kxhcfk
Copy link

kxhcfk commented Jun 25, 2024

Describe the bug

Hello

I'm using storybook version 7.6.19. When running storybook dev command storybook dev, I get following runtime error:

[vite] Pre-transform error: Failed to resolve import "C:UsersUserprogect
eact" from "../../../../virtual:/@storybook/builder-vite/vite-app.js". Does the file exist?

Plugin: vite:import-analysis
  File: /virtual:/@storybook/builder-vite/vite-app.js:3:32
  1  |  // Ensure that the client API is initialized by the framework before any other iframe code
  2  |      // is loaded. That way our client-apis can assume the existence of the API+store
  3  |      import { configure } from 'C:\Users\User\project\node_modules\@storybook\react';
     |                                 ^
  4  |
  5  |      const { logger } = __STORYBOOK_MODULE_CLIENT_LOGGER__;
    at formatError (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:52003:46)
      at TransformContext.error (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:51997:19)
      at normalizeUrl (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:67300:33)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:67455:47
      at async Promise.all (index 0)
      at async TransformContext.transform (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:67376:13)
      at async Object.transform (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:52312:30)
      at async loadAndTransform (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:55067:29)
      at async viteTransformMiddleware (file:///C:/Users/User/project/node_modules/vite/dist/node/chunks/dep-BKbDVx1T.js:64914:32)

Reproduction link

Reproduction steps

No response

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 AMD Ryzen 5 5600H with Radeon Graphics
  Binaries:
    Node: 20.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD <----- active
  Browsers:
    Edge: Chromium (126.0.2592.68)
  npmPackages:
    "@storybook/addon-essentials": "7.6.19"
    "@storybook/addon-interactions": "7.6.19"
    "@storybook/addon-links": "7.6.19"
    "@storybook/addon-onboarding": "^1.0.11"
    "@storybook/blocks": "7.6.19"
    "@storybook/react": "7.6.19"
    "@storybook/react-vite": "7.6.19"
    "@storybook/test": "7.6.19"

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant