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

Couldn't find preset "es2015" relative to directory #7466

Closed
GGonryun opened this issue Dec 5, 2018 · 4 comments
Closed

Couldn't find preset "es2015" relative to directory #7466

GGonryun opened this issue Dec 5, 2018 · 4 comments

Comments

@GGonryun
Copy link
Contributor

GGonryun commented Dec 5, 2018

πŸ› Bug Report

Unable to find preset es2015.

To Reproduce

change directory into the folder ./e2e/babel-plugin-jest-hoist
And then use node ..\..\packages\jest-cli\bin\jest.js


 FAIL  __tests__/integration_automock_off.test.js
  ● Test suite failed to run

    Couldn't find preset "es2015" relative to directory "C:\\Users\\Gonryun\\Documents\\OpenSource\\jest\\e2e\\babel-plugin-jest-hoist"

      at ../../node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
          at Array.map (<anonymous>)

 FAIL  __tests__/integration.test.js
  ● Test suite failed to run

    Couldn't find preset "es2015" relative to directory "C:\\Users\\Gonryun\\Documents\\OpenSource\\jest\\e2e\\babel-plugin-jest-hoist"

      at ../../node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
          at Array.map (<anonymous>)

Test Suites: 2 failed, 2 total
Tests:       0 total
Snapshots:   0 total
Time:        1.251s
Ran all test suites.

Expected behavior

The test should be executed successfully.

Link to repl or repo (highly encouraged)

https://github.com/GGonryun/jest

I wanted to make changes to standardize file names as per issue #4969 but was unable to pass any of the tests in this folder.

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
  Binaries:
    Node: 10.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.12.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

@GGonryun
Copy link
Contributor Author

GGonryun commented Dec 5, 2018

inside the folder ./e2e/babel-plugin-jest-hoist I get a warning that the .e2e/babel-plugin-jest-hoist/.babelrc file has Incorrect type. Expected one of string, array. (4, 5) as well. I'm not sure if this is related though.

I did find that removing the .babelrc file entirely allowed the tests to pass successfully, i'm not sure if it was safe to do this though.

@thymikee
Copy link
Collaborator

thymikee commented Dec 5, 2018

Are you sure you installed deps in e2e/babel-plugin-jest-hoist ?

@GGonryun
Copy link
Contributor Author

GGonryun commented Dec 5, 2018

That was it! Sorry about that πŸ˜†, glad there was better way. Thank you!

@GGonryun GGonryun closed this as completed Dec 5, 2018
@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 12, 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