question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to @babel/preset-env 7.4.4 with core-js@3.x is breaking build

See original GitHub issue

Describe the bug With @babel/preset-env v7.4.3 and using core-js 3.x explicitly in babel config building storybook worked fine. After upgrading @babel/preset-env to the latest release (being 7.4.4) an error is shown when core-js modules are used.

To Reproduce Steps to reproduce the behavior:

  1. Create a babel config with corejs: { version: 3, proposals: true }
  2. Use latest @babel/preset-env v7.4.4
  3. build and start storybook
  4. See errors like Module not found: Error: Can't resolve 'core-js/modules/web.dom-collections.iterator' in ... Module not found: Error: Can't resolve 'core-js/modules/es.array.concat' in ...

Expected behavior A storybook build should not fail with latest babel, when doing a bugfix version bump.

System:

  • OS: MacOS 10.14.4 (18E226)
  • Framework: react
  • Version: 5.0.11

Additional context May be this is also related to https://github.com/storybooks/storybook/issues/6204 but the workaround is not working and wasn’t needed with @babel/preset-env v7.4.3.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rpearcecommented, May 17, 2019

This is fixed for me, as well. Thanks!

1reaction
mrmartineaucommented, May 16, 2019

Thanks @shilman, updating all my @storybook dependencies to @5.1.0-beta.1 fixed the build issues for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ......
Read more >
Updating to Babel 7.4 - The Basement
Since the release of Babel 7.4 there are some breaking changes to the way the polyfilling works. Let's have a look. Update Babel....
Read more >
@babel/preset-env | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
babel/parser - NPM Package Versions - Socket.dev
Start using Socket to analyze @babel/parser and its 0 dependencies to secure your app ... babel-preset-env , babel-runtime-corejs2 , babel-runtime-corejs3 ...
Read more >
@nuxt/babel-preset-app-edge - npm
Furthermore the preset is adding polyfills. Note: Since core-js@2 and core-js@3 are both supported from Babel 7.4.0, we recommend ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found