Storybook: Upgrading to 5 results in `useBuiltIns` option without declaring a core-js version.

Created on 25 Mar 2019  路  12Comments  路  Source: storybookjs/storybook

When upgrading to v5, I get the following warnings:

WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version.

I fixed it by adding the following babel preset:

['@babel/preset-env', { useBuiltIns: 'usage', corejs: 2 }]
babel / webpack bug core

Most helpful comment

@mohamedmansour Everybody who uses Storybook has it. It's another babel minor version upgrade doozy 馃槅

All 12 comments

Same problem,
Adding this property at node_modules/@storybook/core/dist/server/common/babel.js solved

Thanks for figuring this out -- we started getting these errors after core-js@3 got released. Anybody wanna put together a small PR for this? Will merge promptly!

@shilman sure, I was gonna do it this morning but wanted to see if anyone else had the same issue

@mohamedmansour Everybody who uses Storybook has it. It's another babel minor version upgrade doozy 馃槅

Egads!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.15 containing PR #6267 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

Jiminy cricket!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.6 containing PR #6267 that references this issue. Upgrade today to try it out!

Upgrade to 5.0.6 and I am no longer seeing this issue. Thanks @shilman !

I'm seeing this issue in v4.1.18, does the fix need to be backported?

@pelotom It might. I'll patch it back today!

@shilman I opened a PR here.

@pelotom Hmm. Actually the PR you duplicated was buggy and required a second PR to fix it, which changes some core dependencies https://github.com/storybooks/storybook/pull/6281

How important is it to get rid of this warning? On the one hand I appreciate that lots of people are stuck on 4.x. On the other hand, this is a bigger change than I would like for a patch release, and I'm tempted to say "upgrade to 5". But open to discussion.

@shilman I would be happy to upgrade but I've had issues with HMR on v5 that are preventing it... haven't had time to get it down to a minimal reproduction yet.

Was this page helpful?
0 / 5 - 0 ratings