Describe the bug
Running BROWSER=chromium yarn storybook still opens default browser.
To Reproduce
Steps to reproduce the behavior:
npx sb initBROWSER=chromium yarn start opens ChromiumBROWSER=chromium yarn storybook opens default browserExpected behavior
Should open storybook URL in Chromium. See #11014.
Screenshots
N/A
Code snippets
N/A
System:
Environment Info:
System:
OS: macOS 11.0
CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
Binaries:
Node: 14.5.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
Browsers:
Chrome: 84.0.4147.135
Safari: 14.0
npmPackages:
@storybook/addon-actions: ^6.0.16 => 6.0.16
@storybook/addon-essentials: ^6.0.16 => 6.0.16
@storybook/addon-links: ^6.0.16 => 6.0.16
@storybook/node-logger: ^6.0.16 => 6.0.16
@storybook/preset-create-react-app: ^3.1.4 => 3.1.4
@storybook/react: ^6.0.16 => 6.0.16
Additional context
Issue occurs with BROWSER=safari as well.
@yannbf can you help with this?
Hey @noah-friedman, thanks for opening an issue!
Storybook uses better-opn to open the browser, which is a pretty similar, almost identical implementation than CRA.
I've tried to reproduce the issue but it worked fine for me.
Opens my default browser:
yarn storybook
All opened the specific browsers successfully:
BROWSER="chromium" yarn storybook
BROWSER="safari" yarn storybook
BROWSER="firefox" yarn storybook
Weird, I've tried with the quotes as well but to no avail. It's a minor issue though, guess I'll just have it open the default for now.
Update: After switching to Node v12.8.3 (previously on 14.something) and using npm instead of yarn I've stopped having this issue. I'm unsure if it was one or both of those things that fixed the problem, as I did them at the same time. Hopefully this can help anyone else having the same problem.
Most helpful comment
@yannbf can you help with this?