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
Configurable Chromium executable path when extracting stories.json #13724
Comments
I also had the same issue running |
@crohrer Here's my dirty & hacky workaround. Hope it works for you. $ yarn add -D puppeteer
$ sed -i ./node_modules/@storybook/cli/dist/extract.js -e s/puppeteer-core/puppeteer/ |
@ryota-ka Thank you! |
Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.32 containing PR #15878 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
I wanted to generate So I needed a newer Chromium. I ended up using a resolution in
Of course there's a risk that the |
Is your feature request related to a problem? Please describe
stories.json
, which is required for Storybook composition, can be generated through$ npx sb extract
.We sometimes want to use preinstalled Chrome/Chromium by providing its path.
Automatic installation of Chromium works nice in most cases, but we are sometimes faced to the situation it doesn't work well.
sb extract
internally utilizespuppeteer-core
, which aims for programmatic use and does not respect$PUPPETEER_EXECUTABLE_PATH
environment variable by design.This makes it impossible to use preinstalled Chromium and avoid automatic installation.
Describe the solution you'd like
Add a
--chromium-executable-path
(or--chrome-executable-path
) option tosb extract
command.(AFAIK
@storybook/addon-storyshots-puppeteer
already offers such a feature to solve the problem, by providingchromeExecutablePath
option.)Describe alternatives you've considered
We may respect
$PUPPETEER_EXECUTABLE_PATH
environment variable insb extract
, but I don't think it's a good idea.Or we may switch to
puppeteer
frompuppeteer-core
.Are you able to assist to bring the feature to reality?
Yes.
Additional context
Due to this comment,
puppeteer-core
is designed not to install Chromium, unlikepuppeteer
.If we prefer automatic installation, then we may ought to use
puppeteer
instead ofpuppeteer-core
.The text was updated successfully, but these errors were encountered: