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

Latest version of jest 23.6.0 does not work with node v10.13.0 and pnpm version 2.18.2 #7395

Closed
nidkil opened this issue Nov 21, 2018 · 5 comments

Comments

@nidkil
Copy link

nidkil commented Nov 21, 2018

🐛 Bug Report

The latest version of jest 23.6.0 does not work with node v10.13.0 and npm 6.20 or pnpm 2.18.2. The combination does work with yarn 1.12.3.

It throws the following error

Requires Babel "^7.0.0-0", but was loaded with "6.26.3".

This happens both in Ubuntu 18.04 and Windows 10.

Related to issues #6662 and #6913. I first tried all suggestions in these issue before switching to yarn in despair.

To Reproduce

Steps to reproduce the behaviour:

  1. Install node version v10.13.0
  2. Install npm version 6.20 or pnpm 2.18.2
  3. Install yarn version 1.12.3
  4. Install example repo
  5. npm i
  6. jest
  7. rm -rf node_modules && rm package-lock.json

Repeat steps 5-7 for pnpm and yarn.

Expected behaviour

Jest should work with npm, pnpm and yarn.

Link to repl or repo (highly encouraged)

Minimal repo on GitHub to demonstrate the issue.

Run npx envinfo --preset jest

Paste the results here:

System:
    OS: Linux 4.4 Ubuntu 18.04.1 LTS (Bionic Beaver)
    CPU: (4) x64 Intel(R) Core(TM) i7-6650U CPU @ 2.20GHz
  Binaries:
    Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
    Yarn: 1.12.3 - ~/.nvm/versions/node/v10.13.0/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0
@SimenB
Copy link
Member

SimenB commented Nov 21, 2018

It works with both npm and yarn for me. Not pnpm, but that's known: #5369. Help welcome! That said, we're gonna drop babel 6 entirely for the next major of Jest, so it might resolve itself for you after that? #7016

@SimenB SimenB closed this as completed Nov 21, 2018
@nidkil
Copy link
Author

nidkil commented Nov 21, 2018

@SimenB thx for the quick respons.

I see now that I was still half a sleep when I created the issue this morning :-) If I downgrade node to node v8.13.0 all package managers (npm, pnpm and yarn) work. I only tested with LTS releases. There is no v9 LTS release for node, that is why I tested with v8.

I switched from Windows to Linux to make sure the problems I was having were not related to Windows. In the issues I mention and the issue you mention there is no information regarding the version of node and npm. I think it is helpful that others can find it to help them and avoid frustration and wasting hours trying to fix an issue that is known.

I suggest adding a README.md to the minimum example to explain this problem with jest in combination with version v10 (and v9?) of node. Just a suggestion to avoid frustrated users :-)

When is the next major release expected?

@SimenB
Copy link
Member

SimenB commented Nov 21, 2018

PR welcome adding a readme! 🙂

Next major release is expected before Christmas, hopefully. Only blocker is actually getting Babel 7 to work properly (we've found a bug in istanbul using Babel 7)

@nidkil
Copy link
Author

nidkil commented Nov 22, 2018

@SimenB I submitted a pull request with the README.md.

@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