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?]: Yarn 3.2.0, 3.2.1 and 3.2.2 cannot run 'jest' via 'yarn run', but 3.1.1 can #4680

Closed
1 task
alubbe opened this issue Jul 27, 2022 · 2 comments
Closed
1 task
Labels
bug Something isn't working

Comments

@alubbe
Copy link
Contributor

alubbe commented Jul 27, 2022

Self-service

  • I'd be willing to implement a fix

Describe the bug

Yarn 3.2.0, 3.2.1 and 3.2.2 cannot run 'jest' via 'yarn run' (it hangs forever), but 3.1.1 can - see https://github.com/alubbe/yarn-jest-bug

// package.json
{
  "name": "yarn-jest",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "jest"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "packageManager": "yarn@3.1.1",
  "devDependencies": {
    "jest": "^28.1.3"
  }
}
// foo.test.js
test('should return latest for builds on main', () => {
  expect('foo'
  ).toEqual('foo');
});

To reproduce

Clone https://github.com/alubbe/yarn-jest-bug. This will give you a simple repo with a single, simple jest test. Run

$ yarn && yarn test
... this will time out

The result is the same when running yarn set version 3.2.1 && yarn && yarn test and yarn set version 3.2.0 && yarn && yarn test. But when going to 3.1.1, it suddenly works:

$ yarn set version 3.1.1 && yarn && yarn test
...
 PASS  ./foo.test.js
  ✓ should return latest for builds on main (2 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.331 s, estimated 1 s
Ran all test suites.

Environment

System:
    OS: macOS 12.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 16.13.2 - /private/var/folders/r8/nb6t8b8n2fx9fc9lcbkb52lw0000gn/T/xfs-2c0e91ab/node
    Yarn: 3.2.2 - /private/var/folders/r8/nb6t8b8n2fx9fc9lcbkb52lw0000gn/T/xfs-2c0e91ab/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm

Additional context

No response

@alubbe alubbe added the bug Something isn't working label Jul 27, 2022
@merceyz
Copy link
Member

merceyz commented Jul 27, 2022

Duplicate of #4157

@merceyz merceyz marked this as a duplicate of #4157 Jul 27, 2022
@merceyz merceyz closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
@alubbe
Copy link
Contributor Author

alubbe commented Jul 27, 2022

So in short, it's fixed by upgrading node to at least 16.14? Thank you - I had been unable to find this on the issue tracker!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants