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 not working with @babel/core #4862

Closed
fehergeri13 opened this issue Nov 8, 2017 · 2 comments
Closed

Jest not working with @babel/core #4862

fehergeri13 opened this issue Nov 8, 2017 · 2 comments

Comments

@fehergeri13
Copy link

fehergeri13 commented Nov 8, 2017

https://github.com/babel/babel/tree/master/packages/babel-core

If I use jest (21.2.1) with @babel/core (7.0.0-beta.31) I get this error:

 FAIL  src\index.test.jsx
  ● Test suite failed to run

    Couldn't find preset "@babel/env" relative to directory "frontend"
      
      at node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
      at Array.map (native)
      at OptionManager.resolvePresets (node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
      at OptionManager.mergePresets (node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
      at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
      at OptionManager.init (node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
      at File.initOptions (node_modules/babel-core/lib/transformation/file/index.js:212:65)
      at new File (node_modules/babel-core/lib/transformation/file/index.js:135:24)
      at Pipeline.transform (node_modules/babel-core/lib/transformation/pipeline.js:46:16)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        2.085s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

If I use jest@test I get this error:

 FAIL  src\index.test.jsx
  ● Test suite failed to run

    Cannot find module 'babel-core'
      
      at _load_babelCore (node_modules/babel-jest/build/index.js:17:49)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        2.134s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

Process finished with exit code 1
@SimenB
Copy link
Member

SimenB commented Nov 8, 2017

See discussion in #4557. We don't quite know how to handle it yet

@SimenB SimenB closed this as completed Nov 8, 2017
@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

2 participants