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

[Bug]: Jest installation fails when using pnpm with strict-peer-dependencies setting #12215

Closed
patryk-bartoszek opened this issue Jan 5, 2022 · 1 comment · Fixed by #12216

Comments

@patryk-bartoszek
Copy link

Version

27.4.6

Steps to reproduce

First set strict-peer-dependencies flag in .npmrc file:

pnpm config set strict-peer-dependencies=true --userconfig=.npmrc

Next try to install jest

pnpm install jest@27.4.6

Expected behavior

I should be able to install jest without explicitly specifying dependency on @babel/core@^7.0.0-0.

Actual behavior

The pnpm install jest@27.4.6 command fails with the following message:
ERR_PNPM_MISSING_PEER_DEPENDENCY  jest > @jest/core > jest-config > babel-jest > babel-preset-jest > babel-preset-current-node-syntax: @babel/plugin-syntax-async-generators@7.8.4 requires a peer of @babel/core@^7.0.0-0 but none was installed.

Additional context

The issue was introduced by jest-config@27.4.6
In version 27.4.6 the dependency on @babel/core was removed (it was present in previous version 27.4.5).

The purpose of that dependency was to satisfy peerDependency defined in babel-jest.

This appears to be caused by changes in #12190.

Environment

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
  Binaries:
    Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
@patryk-bartoszek patryk-bartoszek changed the title [Bug]: Jest instalation fails when using pnpm with strict-peer-dependencies setting [Bug]: Jest installation fails when using pnpm with strict-peer-dependencies setting Jan 5, 2022
@SimenB SimenB linked a pull request Jan 5, 2022 that will close this issue
@github-actions
Copy link

github-actions bot commented Feb 5, 2022

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 Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant