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

Error: Cannot find module 'core-js/modules/es6.array.sort' #9134

Closed
MrEfrem opened this Issue Dec 6, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@MrEfrem

MrEfrem commented Dec 6, 2018

Bug Report

Current Behavior

I get an error:

Error: Cannot find module 'core-js/modules/es6.array.sort'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (.../WebProjects/myproject/src/utils/content.js:14:1)
    at Module._compile (module.js:653:30)
    at Module._compile (.../WebProjects/myproject/node_modules/pirates/lib/index.js:83:24)
    at Module._extensions..js (module.js:664:10)
    at Object.newLoader [as .js] (.../WebProjects/myproject/node_modules/pirates/lib/index.js:88:7)
    at Module.load (module.js:566:32)

I'm sure broken latest release and this issue can be related: #8253

Environment

  • Babel version(s): v7.2.0
  • Node/npm version: Node 8/npm 6.4.1
  • OS: OSX 10.14.1
  • Monorepo no
  • How you are using Babel: [register, loader]

Possible Solution

{
  "presets": [
    [
      "@babel/env",
      {
        "targets": {
          "node": 8
        },
        "useBuiltIns": "usage"
      }
    ],
    "@babel/flow"
  ]
}

If I change "useBuiltIns" from "usage" to "entry" then all works.

@MrEfrem MrEfrem added the i: bug label Dec 6, 2018

@babel-bot

This comment has been minimized.

Collaborator

babel-bot commented Dec 6, 2018

Hey @MrEfrem! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@loganfsmyth

This comment has been minimized.

Member

loganfsmyth commented Dec 16, 2018

If you're using usage you need to have core-js in your dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment