jest: Yarn hangs when installing jest@22.0.x
Do you want to request a feature or report a bug? Bug
What is the current behavior?
Yarn hangs on yarn add -D jest@22.0.4
.
Works fine with v21.2.1
.
I deleted node_modules
and yarn.lock
and ran yarn cache clean
just to make sure.
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install
and yarn test
.
$ yarn add -D jest@22.0.0
yarn add v1.3.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
⠁
⠁
⠁
[1/1] ⡀ weak
[-/1] ⡀ waiting...
[1/1] ⠁ weak
[1/1] ⡀ weak
[1/1] ⠈ weak
[1/1] ⠁ weak
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
[-/4] ⠄ waiting...
[-/4] ⠄ waiting...
[3/4] ⠄ weak
[-/4] ⠄ waiting...
[-/4] ⠄ waiting...
With --verbose
:
...
verbose 16.456 Removing extraneous file "/Users/alex/.config/yarn/global/node_modules/tabtab/node_modules/.bin".
verbose 16.456 Removing extraneous file "/Users/alex/.config/yarn/global/node_modules/tar-pack/node_modules/.bin".
verbose 16.457 Removing extraneous file "/Users/alex/.config/yarn/global/node_modules/yarn-completions/node_modules".
verbose 16.457 Removing extraneous file "/Users/alex/.config/yarn/global/node_modules/yarn/node_modules/.bin".
verbose 16.458 Removing extraneous file "/Users/alex/.config/yarn/global/node_modules/yarn-completions/node_modules/.bin".
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
[4/5] ⡀ weak
[4/4] 📃 Building fresh packages...
[1/4] ⠄ spawn-sync
[-/5] ⠁ waiting...
[-/5] ⠁ waiting...
[3/4] ⠠ weak
[-/4] ⠠ waiting...
verbose 17.204 Sun, 24 Dec 2017 14:31:40 GMT tabtab:installer Installing completion script to bashrc directory
Sun, 24 Dec 2017 14:31:40 GMT tabtab:installer Installing completion script to /Users/alex/.bashrc directory
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
[3/4] ⠁ weak
[-/4] ⠁ waiting...
verbose 18.416 node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.6.39
node-pre-gyp info using node@9.3.0 | darwin | x64
node-pre-gyp info check checked for "/Users/alex/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
node-pre-gyp http 200 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
node-pre-gyp info install unpacking fse.node
[-/5] ⠄ waiting...
[-/4] ⠈ waiting...
[3/4] ⠈ weak
[-/4] ⠈ waiting...
[-/4] ⠈ waiting...
What is the expected behavior? Should not hang
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Node v9.3.0 Yarn 1.3.2 Mac OS X 10.12.6
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 35 (13 by maintainers)
Yeah, I think we might remove the dependency to
jest-leak-detector
(either converting it to peer, or removing it completely), and hard crashing whenever leak detection needs to be used butjest-leak-detector
is not on yournode_modules
folder.@mjesun To be clear, since I first reported an issue mine now exits with error code zero, but I don’t know what fixed it.
As a slight aside, I’m personally not a fan of a popular library like
If I saw this and didn’t know what was going on, I’d be concerned and spend some time investigating despite the eventual skipping of the failure.
jest
having an install experience that looks scary even when it works, I don’t know if that’s something you guys care about or not. My working install looks like this.Oh, that’s really interesting! You just found a bug in either
lerna
oryarn
.Experienced this issue as well.
Node v9.3.0 Yarn 1.3.2 MacOS High Sierra 10.13.1
@SamPruden Sure thing - here’s console output while trying to install with yarn:
Here’s console output when installing with npm:
Here’s my package.json file:
@jaylandro Oh sorry, I just realized that people with
npm
is also experiencing a non-zero exit code. Being listed as optional, the compile phase should crash and the install should continue normally, skipping the dependency. I’m not sure what’s going on 😞npm i
w/ jest22.0.4
throw this error log and fails