Skip to content

[Bug]: Failed to resolve module in static storybook build #21771

Closed

Description

Describe the bug

  1. In a Vite (using Vue 2.7) project I setup Storybook using npx sb@next init
  2. Ran yarn build-storybook
  3. Copied the storybook-static to an empty GitHub repository and renamed folder docs
  4. Setup github pages to point to that branch and docs folder

When I visit the github pages link storybooks loads but I see the following error Failed to resolve module specifier "vue/dist/vue.esm.js". Relative references must start with either "/", "./", or "../".

image

To Reproduce

Repo: https://github.com/brettsaunders21/storybook-issue-21771
https://brettsaunders21.github.io/storybook-issue-21771/

Steps

  1. Run reproducer command and select Vue 2.7
  2. Run yarn in repo
  3. Run yarn build-storybook
  4. Copy contents of static-storybook to new branch gp-pages with no other contents in
  5. Go to Gihtub repo settings, pages
  6. Select deploy from branch, gp-pages and /root and save
  7. Open deploy and see dynamic import error
    image

System

No response

Additional context

No response

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

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions