-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
start haul/react-native using named binaries instead of cli.js #2715
Conversation
yarn workspaces breaks storybook due to absolute path of cli.js changes to workspace root.
Codecov Report
@@ Coverage Diff @@
## master #2715 +/- ##
=======================================
Coverage 34.31% 34.31%
=======================================
Files 391 391
Lines 8806 8806
Branches 922 909 -13
=======================================
Hits 3022 3022
- Misses 5174 5188 +14
+ Partials 610 596 -14
Continue to review full report at Codecov.
|
I wonder why didn't we call them like that from day one then |
I've tested this on Windows and works correctly. Haven't realized before it's possible to call binaries like that, so thanks @meros for the enlightenment :) |
start haul/react-native using named binaries instead of cli.js
yarn workspaces breaks storybook due to absolute path of cli.js changes to workspace root.
Issue:
yarn workspaces causes node modules to end up in the workspace root. And in general node resolves node_modules by searching in parent folders. Because of this we cannot assume the location of cli.js to be known.
It's important to note that this issue is not isolated to workspaces, but rather related to the naive view of how node_modules are resolved that causes the bug.
What I did
Change to use react-native or haul using installed binary name. These binaries are callable even when not installed globally when storybook is called through npm scripts.
How to test
Put a react native app w storybook as a package in a yarn workspace repo. Try to run yarn storybook.
Is this testable with jest or storyshots?
no
Does this need a new example in the kitchen sink apps?
no
Does this need an update to the documentation?
no
If your answer is yes to any of these, please make sure to include it in your PR.