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]: Vite: Pre-transform error: Failed to load url /sb-preview/runtime.js. Does the file exist? #25287

Closed
shilman opened this issue Dec 20, 2023 · 1 comment

Comments

@shilman
Copy link
Member

shilman commented Dec 20, 2023

Describe the bug

When loading any URL in Storybook I get the following error in the terminal:

[vite] Pre-transform error: Failed to load url /sb-preview/runtime.js (resolved id: /sb-preview/runtime.js). Does the file exist?

To Reproduce

For 8.0, in an empty directory type:

pnpx storybook@next init

Then select the Vite-React option.

For 7.6 do it by hand:

pnpm create vite
cd vite-react
pnpx storybook@latest init

System

System:
    OS: macOS 14.1.2
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.12.1 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 120.0.6099.109
    Safari: 17.1.2
  npmPackages:
    @storybook/addon-essentials: ^7.6.6 => 7.6.6 
    @storybook/addon-interactions: ^7.6.6 => 7.6.6 
    @storybook/addon-links: ^7.6.6 => 7.6.6 
    @storybook/addon-onboarding: ^1.0.10 => 1.0.10 
    @storybook/blocks: ^7.6.6 => 7.6.6 
    @storybook/react: ^7.6.6 => 7.6.6 
    @storybook/react-vite: ^7.6.6 => 7.6.6 
    @storybook/test: ^7.6.6 => 7.6.6 
    eslint-plugin-storybook: ^0.6.15 => 0.6.15 
    storybook: ^7.6.6 => 7.6.6 


### Additional context

_No response_
@shilman shilman moved this to Empathy Backlog in Core Team Projects Dec 20, 2023
@vanessayuenn vanessayuenn moved this from Empathy Backlog to Ready for work in Core Team Projects Dec 20, 2023
@JReinhold
Copy link
Contributor

Closing as duplicate of #25256 that has more info

@JReinhold JReinhold closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2023
@github-project-automation github-project-automation bot moved this from Ready for work to Done in Core Team Projects Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants