You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a monorepo using storybook composition. Each workspace inside monorepo has its own storybook and everything is working fine in development mode.
Trying to run storybook in production from storybook-static results in errors.
Running npx http-server ./storybook-static will start http server on localhost:8080.
All other assets are being loaded from localhost:8080/${storybook-static-paths} such as localhost:8080/sb-common-assets etc.
However, loading runtime.js from sb-preview will result in 404 because for some reason GET path has workspace name appended to it so it tries to GET from /workspace/name/sb-preview/runtime.js. When going to localhost:8080/sb-preview/runtime.js then file exists and all looks fine.
I have a feeling that my configuration is wrong somehow but for the life of me I can't understand what is wrong. This is a fresh storybook install so no special addons or anything.
Terminal output when trying to open static storybook build:
GET /iframe.html
GET /index.json
GET /stories.json
GET /iframe.html?id=configuration--docs&viewMode=docs&refId=components
GET /sb-common-assets/fonts.css
GET /assets/index-7760522e.js
GET /assets/preload-helper-a4192956.js
GET /sb-common-assets/nunito-sans-regular.woff2
GET /sb-common-assets/nunito-sans-italic.woff2
GET /sb-common-assets/nunito-sans-bold.woff2
GET /sb-common-assets/nunito-sans-bold-italic.woff2
GET /components/sb-preview/runtime.js
"GET /components/sb-preview/runtime.js" Error (404): "Not found"`
Why is storybook trying to GET /sb-preview/runtime.js from /components when all others imports are from / ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I have a monorepo using storybook composition. Each workspace inside monorepo has its own storybook and everything is working fine in development mode.
Trying to run storybook in production from storybook-static results in errors.
Running
npx http-server ./storybook-static
will start http server on localhost:8080.All other assets are being loaded from localhost:8080/${storybook-static-paths} such as localhost:8080/sb-common-assets etc.
However, loading runtime.js from sb-preview will result in 404 because for some reason GET path has workspace name appended to it so it tries to GET from /workspace/name/sb-preview/runtime.js. When going to localhost:8080/sb-preview/runtime.js then file exists and all looks fine.
I have a feeling that my configuration is wrong somehow but for the life of me I can't understand what is wrong. This is a fresh storybook install so no special addons or anything.
Terminal output when trying to open static storybook build:
Why is storybook trying to GET /sb-preview/runtime.js from /components when all others imports are from / ?
Beta Was this translation helpful? Give feedback.
All reactions