#storybook-deployer

9 messages · Page 1 of 1 (latest)

spare berry
#

Hi, I have just upgraded to 7.0.0-rc.5. Everything worked fine until it was time to deploy the static site to github. I have been using storybook-deployer and deployed with this command: storybook-to-ghpages -o .storybook-static-build --packages packages

However, after upgrading this doesn't work anymore. I get this error message:
Error: Exec code(1) on executing: build-storybook -o .storybook-static-build
'build-storybook' is not recognized as an internal or external command, operable program or batch file.

On this site https://storybook.js.org/docs/react/sharing/publish-storybook it still says that https://github.com/storybook-eol/storybook-deployer is maintained, but the repo is in fact archived.

So how do I publish my storybook 7 to github? (Note that I have a monorepo... I use the --packages argument.)

Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. It’s open source and free.

GitHub

Deploy your storybook as a static site. Contribute to storybook-eol/storybook-deployer development by creating an account on GitHub.

spare berry
#

Hm, nobody can answer me? I find it pretty strange that storybook-deployer is archived without any words about what to use instead.

tepid fable
spare berry
#

Well, those instructions are not updated to v7 either. I would say that when you archive a repository it is very helpful to add some sort of information about why. Usually the reason is that a better/other solution exists. In this case I had to do some research myself and I switched to the gh-pages package, which work. Unfortunately there seems to be an error with @storybook/builder-vite . I get this error when I access the site: Failed to fetch dynamically imported module: https://domain/preview-1bb7c46c.js The file exists on the server, so it seems odd that it can't be fetched

river dove
#

@spare berry sorry about that, are there other errors in your terminal or browser console?

spare berry
#

I get these in chrome devtools console:
GET https://exampledomain/assets/_commonjsHelpers-042e124d.js net::ERR_ABORTED 404
GET https://exampledomain/assets/_getPrototype-44cdb323.js net::ERR_ABORTED 404

runtime.mjs:4 Error reading preview.js:
error @ runtime.mjs:4
renderPreviewEntryError @ runtime.mjs:82
renderPreviewEntryError @ runtime.mjs:96
(anonymous) @ runtime.mjs:80
(anonymous) @ runtime.mjs:4
_runRejections @ runtime.mjs:4
_setRejected @ runtime.mjs:4
_failWith @ runtime.mjs:4
(anonymous) @ runtime.mjs:4
_runRejections @ runtime.mjs:4
_setRejected @ runtime.mjs:4
_failWith @ runtime.mjs:4
(anonymous) @ runtime.mjs:4
Promise.catch (async)
_chainPromiseData @ runtime.mjs:4
_handleUserFunctionResult @ runtime.mjs:4
(anonymous) @ runtime.mjs:4
_runResolutions @ runtime.mjs:4
then @ runtime.mjs:4
getProjectAnnotationsOrRenderError @ runtime.mjs:74
initialize @ runtime.mjs:74
(anonymous) @ vite-app.js:23

TypeError: Failed to fetch dynamically imported module: https://domain/assets/config-31cc6fee.js
error @ runtime.mjs:4
renderPreviewEntryError @ runtime.mjs:82
renderPreviewEntryError @ runtime.mjs:96
(anonymous) @ runtime.mjs:80
(anonymous) @ runtime.mjs:4
_runRejections @ runtime.mjs:4
_setRejected @ runtime.mjs:4
_failWith @ runtime.mjs:4
(anonymous) @ runtime.mjs:4
_runRejections @ runtime.mjs:4
_setRejected @ runtime.mjs:4
_failWith @ runtime.mjs:4
(anonymous) @ runtime.mjs:4
Promise.catch (async)
_chainPromiseData @ runtime.mjs:4
_handleUserFunctionResult @ runtime.mjs:4
(anonymous) @ runtime.mjs:4
_runResolutions @ runtime.mjs:4
then @ runtime.mjs:4
getProjectAnnotationsOrRenderError @ runtime.mjs:74
initialize @ runtime.mjs:74
(anonymous) @ vite-app.js:23

river dove
#

sounds like there's an issue in your preview.js maybe. Can you share the contetns of that?

spare berry
#

import React from 'react';

export const decorators = [
Story => (
<div style={{ margin: '40px' }}>
<Story />
</div>
),
];

trail nimbus
#

I solved this just recently and the trick is to add .nojekyll in the root of the Github pages repo.