Skip to content
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

Fix Module not found: Error: Can't resolve 'core-js/modules/es6.array.concat.js' with compat-data@7.13.x #12901

Merged
merged 6 commits into from Feb 25, 2021
Merged

Conversation

luxp
Copy link
Contributor

@luxp luxp commented Feb 25, 2021

Q                       A
Patch: Bug Fix? Bugfix
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Any Dependency Changes? No
License MIT

After upgrade the @babel/compat-data@7.13 encounted the problem below.

image

.babelrc

[
      '@babel/preset-env',
      {
        'targets': targets || {
          'android': '4',
          'ios': '9',
        },
        'useBuiltIns': 'entry',
        'corejs': 2,
        'modules': false,
      },
]

Usage in code

import '@babel/polyfill'

Related this pull request: https://github.com/babel/babel/pull/12850/files#r582504324

@babel-bot
Copy link
Collaborator

babel-bot commented Feb 25, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/42769/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 25, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ecf1057:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@nicolo-ribaudo
Copy link
Member

I'm sorry 🤦 I missed this because the comment explaining why these were not included gave the wrong reason.

Can you delete them from packages/babel-compat-data/scripts/data/corejs2-built-in-features.js?

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 25, 2021

NOTE: The CI / Test @babel/runtime integrations failure is unrelated (it's also failing on main).

Could you run OVERWRITE=true make test to update the fixtures? I don't think there will be any change, since those fixtures are generated by babel-plugin-polyfill-corejs2 which pulls the @babel/compat-data dependency from npm and not from the monorepo.

@nicolo-ribaudo
Copy link
Member

Actually, adding this to resolutions in the top-level package.json would probably make the tests correctly reflect @babel/compat-data:

"babel-plugin-polyfill-corejs2/@babel/compat-data": "workspace:*"

@nicolo-ribaudo nicolo-ribaudo added i: regression pkg: compat-data pkg: preset-env PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Feb 25, 2021
@luxp
Copy link
Contributor Author

luxp commented Feb 25, 2021

Actually, adding this to resolutions in the top-level package.json would probably make the tests correctly reflect @babel/compat-data:

"babel-plugin-polyfill-corejs2/@babel/compat-data": "workspace:*"

I'm trying

@nicolo-ribaudo
Copy link
Member

You need to run yarn to update the lockfile 🙏

@luxp
Copy link
Contributor Author

luxp commented Feb 25, 2021

This seems has been fixed. And tests are all passed on my local machine.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This was referenced Mar 8, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: compat-data pkg: preset-env PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants