-
Notifications
You must be signed in to change notification settings - Fork 71
iframe URL 404s #56
Comments
I'm having the same issue. Storybook runs fine locally, but 404s on iframe.html either when built as a static site, or when deployed to gh-pages. |
any progress? |
Just merged this, not sure if it's related: storybookjs/storybook#5947 |
Yeah, actually. I got my deployments to work by pre-building the storybook assets and deploying in a separate step using the In case it's helpful, here is my CircleCI config (at least the job aliases) and my scripts in package.json config.yml (excerpt) - &build-storybook-steps
- checkout
- restore_cache: *restore-root-dependencies
- restore_cache: *restore-functions-dependencies
- run:
name: update npm and yarn
command: "sudo npm install -g npm@latest && sudo npm install -g yarn@latest"
- add_ssh_keys:
fingerprints:
- "xxxxx"
- run: yarn build-storybook
- run: ls dist_storybook
- run:
name: Check for iframe.html
command: |
if [ ! -f dist_storybook/iframe.html ]; then
echo "iframe.html File not found!"
exit 1
fi
- run: *fail_notification
- &deploy-storybook-steps
- checkout
- restore_cache: *restore-root-dependencies
- restore_cache: *restore-functions-dependencies
- add_ssh_keys:
fingerprints:
- "xxxx"
- run: yarn build-storybook
- run: ls dist_storybook
- run:
name: Check for iframe.html
command: |
if [ ! -f dist_storybook/iframe.html ]; then
echo "iframe.html File not found!"
exit 1
fi
- run: yarn deploy-existing-storybook-ci
- run: *fail_notification
package.json scripts (excerpt): {
"scripts": {
"build-storybook": "yarn run config:get && build-storybook -c .storybook -o dist_storybook",
"deploy-existing-storybook-ci": "yarn run config:get && storybook-to-ghpages --out=dist_storybook --existing-output-dir=dist_storybook --ci",
} Note, the |
@shilman had that error (no iframe.html on build-storybook) too, changed from absolute output path to relative one and it has been fixed. Waiting for merging your pr into master, thx |
@artaommahe - in which file did you change the path? |
@yairEO for my case
changed DIST_PATH from absolute to relative But now, with [email protected], it works with absolute paths. |
Ran into the same problem, we were using a docker image to deploy in the CI however the storybook config I assume the storybook configuration files are missing or not setup correctly. |
I'm also seeing this same issue on our Storybook deployed to GH Pages. However, we only have issues with static assets like the favicon and background images. Some details are below, happy to provide anything else as needed. Thanks! Dependencies
Scripts
Error
|
I think this problem happens in storybook 6 again |
@Jack-Works Did you solve your issue in Storybook 6? |
Yes, but I didn't remember how. Maybe some special command line argument |
Still getting this error. I'm using Storybook 6 and github actions. Any tips? |
Is there a known fix for this yet? Currently experiencing in Storybook@6 seems crazy that there's no programatic solution to this issue |
I was having a similar issue. I fixed this by running a
I hope this helps anyone p.s. EDIT: ANOTHER EDIT: |
I am using Storybook Vite and this config worked for me:
|
@leandrosrocha your solution works for me, thank you. |
I have deployed this repo https://github.com/leanne1/swatch-book/ to GH pages but the Storybook iframe 404s: https://leanne1.github.io/swatch-book/
The iframe src is https://leanne1.github.io/swatch-book/iframe.html? which does not exist. So whilst the Storybook UI deploys, my repo demo does not. I followed the simple steps in the README. No custom config.
Any help on getting this working would be appreciated!
The text was updated successfully, but these errors were encountered: