Storybook does not open in default browser #15316
Comments
|
FWWIW we use |
|
Well it should be possible to detect the default browser and only use better-opn if it is one of the Chromium browsers supported by better-opn. Far more annoying for it to open in a different browser than a different tab. |
|
@muster-mark PRs welcome! |
|
I think the issue is with better-opn to be honest, it's hardly "better" if it doesn't open in the user's preferred browser. You may wish to use open instead of better-opn, though it may annoy chrome users who enjoyed that functionality. I am satisfied by using the --ci option to prevent opening in a browser at all. I am of the opinion that not opening in a browser would be a better default anyway. |
|
You can also install |
Thanks for the idea @pilar1357 but this is a multi-dev project. |


Describe the bug
My default browser is Firefox (if I type
open https://storybook.js.org/in my console then it opens in Firefox. However when I runnpm run storybookit opens in another browser I happen to have installed on my computer, called Google Chrome.To Reproduce
Set Firefox as default Browser. In a Story book project, run
npm run storybookSystem
Environment Info:
System:
OS: macOS 11.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
npm: 6.14.11 - ~/.nvm/versions/node/v12.16.1/bin/npm
Browsers:
Chrome: 91.0.4472.114
Edge: 91.0.864.54
Firefox: 89.0.1
Safari: 14.1.1
The text was updated successfully, but these errors were encountered: