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

Jest can't resolve @babel/env #4882

Closed
jukben opened this issue Nov 13, 2017 · 3 comments
Closed

Jest can't resolve @babel/env #4882

jukben opened this issue Nov 13, 2017 · 3 comments

Comments

@jukben
Copy link
Contributor

jukben commented Nov 13, 2017

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Jest can't resolve @babel/env with configuration

package.json

"babel": {
    "presets": [
      "@babel/env"
    ]
  }

What is the expected behavior?

Jest could resolve @babel/env (according to their documentation). With @babel/preset-env it's OK but then I run into

TypeError: Cannot read property 'loose' of undefined (While processing pres$
t: "<..>/node_modules/@babel/preset-env/lib/index.js")

(which looks to be issue in Babel itself)

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

package.json

 "devDependencies": {
    "@babel/cli": "^7.0.0-beta.32",
    "@babel/core": "^7.0.0-beta.32",
    "@babel/preset-env": "^7.0.0-beta.32",
    "jest": "^21.2.1"
  },
  "babel": {
    "presets": [
      "@babel/env"
    ]
  }
@kesne
Copy link

kesne commented Nov 13, 2017

The issue is that babel-jest uses babel-core, not @babel/core. There's ongoing discussion here: #4557

@rogeliog
Copy link
Contributor

I'll close this in favor of #4557, but feel free to reopen if needed 😄

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants