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

StoryBook in Vercel Error: Failed to load static files, no such directory: ./.storybook/..\public #11399

Open
wissam6 opened this issue Apr 7, 2024 · 0 comments

Comments

@wissam6
Copy link

wissam6 commented Apr 7, 2024

In this article - https://vercel.com/guides/storybook-with-vercel

These commands do not work:

{
  "storybook": "start-storybook -p 6006 -s public",
  "build-storybook": "build-storybook -s public",
  "serve-storybook": "serve storybook-static"
}

Instead, they should be:

{
    "storybook": "storybook dev -p 6006 public",
    "build-storybook": "storybook build public",
    "serve-storybook": "npx serve ./.storybook"
}

Also in this section, the build command should be npm run build since npm run build-storybook causes the following error in the Vercel deployment:

image

Ofcourse, this will work if you generate the static folder storybook-static after running npm run build-storybook and pushing it to the GitHub repo. The above error might need a bug fix.

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

No branches or pull requests

1 participant