-
-
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
Add missing regenerator and runtime babel transform pkgs to package.json #1848
Conversation
app/react/src/server/config/babel.js uses require.resolve on both of these packages, yet as they are not in the dependencies, they won't be found unless they are installed alongside storybook itself
Now, as I was working on the reproduction repository, I also noticed that a similar issue can be found with I'm not really sure how we could test for these missing dependencies in CI, given this monorepo architecture 😕 . If anyone has any ideas on how that could work, I could try to work on a proof of concept. These subtle dependency errors are very nasty, and due to how yarn & npm@3 and forwards lifts all dependencies to the top level, they aren't easily discoverable either 😰 |
Codecov Report
@@ Coverage Diff @@
## master #1848 +/- ##
=======================================
Coverage 21.33% 21.33%
=======================================
Files 257 257
Lines 5737 5737
Branches 689 685 -4
=======================================
Hits 1224 1224
+ Misses 3989 3986 -3
- Partials 524 527 +3
Continue to review full report at Codecov.
|
Please do the same for As for |
Done!
Mmm yeah, another PR sounds reasonable. I don't think I'll be working on that, as it does sound a controversial change and I'm afraid I don't have enough insight information to lead that discussion in a fruitful fashion. |
Awesome @valscion thank you !! |
Could this change be added to the 3.3.0-alpha.0 version? |
I'm getting this error on 4.0.4, is it something that has been missed in the transition from 3 to 4, or am I experiencing something new and exciting? It's happening for me in an Nx workspace with @angular/cli 7.
|
@StevenFewster can you create a new issue for your case? |
app/react/src/server/config/babel.js uses require.resolve on both of
these packages, yet as they are not in the dependencies, they won't be
found unless they are installed alongside storybook itself
Issue: fix #1729
What I did
I added the missing packages to
package.json
How to test
See https://github.com/valscion/storybook-repro-1729/tree/master for the broken case. Run
npm install
withnpm@2.x
version to force an error from these missing dependencies.Note that this is not a specific issue for npm@2.x — it could happen also should newer npm versions not install these packages at root level for one reason or another.
A fixed case with this change is here: https://github.com/valscion/storybook-repro-1729/tree/fix-repro