-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Yarn hangs when installing [email protected] #5169
Comments
@mjesun Ideas? |
Experienced this issue as well. Node v9.3.0 |
|
Can confirm, I've got another similar case of this with NPM on Windows here. I think I've partially tracked down the issue.
The internal The issue may partly be related to my dev environment, as reports seem a little inconsistent on this. I have the Glancing through the issues on the I'd appreciate if this dependency could be rolled-back for now until this is sorted, as I just went through the whole process of
EDIT: I should note that I'm running Windows 10, node v9.3.0, npm v5.6.0, node-gyp v3.6.2, windows-build-tools v1.3.2 and running the |
This is really weird, as |
@SimenB The copy of "dependencies": {
"pretty-format": "^22.0.3",
"weak": "^1.0.1"
},
...
"optionalDependencies": {
"weak": "^1.0.1"
}, I'm not too sure what's going on with that My full copy of {
"_from": "jest-leak-detector@^22.0.3",
"_id": "[email protected]",
"_inBundle": false,
"_integrity": "sha512-xyVdAmcG8M3jWtVeadDUU6MAHLBrjkP4clz2UtTZ1gpe5bRLk27VjQOpzTwK20MkV/6iZQhSuRVuzHS5kD0HpA==",
"_location": "/jest-leak-detector",
"_phantomChildren": {
"ansi-styles": "3.2.0"
},
"_requested": {
"type": "range",
"registry": true,
"raw": "jest-leak-detector@^22.0.3",
"name": "jest-leak-detector",
"escapedName": "jest-leak-detector",
"rawSpec": "^22.0.3",
"saveSpec": null,
"fetchSpec": "^22.0.3"
},
"_requiredBy": [
"/jest-runner"
],
"_resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-22.0.3.tgz",
"_shasum": "b64904f0e8954a11edb79b0809ff4717fa762d99",
"_spec": "jest-leak-detector@^22.0.3",
"_where": "C:\\Users\\A\\Dev\\eq-engine\\node_modules\\jest-runner",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"bundleDependencies": false,
"dependencies": {
"pretty-format": "^22.0.3",
"weak": "^1.0.1"
},
"deprecated": false,
"description": "Module for verifying whether an object has been garbage collected or not.",
"homepage": "https://github.com/facebook/jest#readme",
"license": "MIT",
"main": "build/index.js",
"name": "jest-leak-detector",
"optionalDependencies": {
"weak": "^1.0.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git"
},
"version": "22.0.3"
} |
Oh, that's really interesting! You just found a bug in either $ y info jest-leak-detector dependencies
yarn info v1.3.2
{ 'pretty-format': '^22.0.3',
weak: '^1.0.1' }
✨ Done in 0.20s. |
Well that's fun. I've actually never directly touched either of those packages so I can't particularly comment on the details of that. If there's no easy fix for this on your end until that gets patched in I'd offer to PR it, but it's probably best I don't mess with a buggy build process that I don't really understand. |
Seems like it's by design... npm/npm#3502 But "If there's a dep in dependencies, but it's also in optionalDependencies, then the optional-ness takes precedence.", so it should still work (just really confusing). I don't understand why it fails your build, then. If you have a package.json like this: {
"name": "some-name",
"version": "0.0.0",
"optionalDependencies": {
"weak": "^1.0.1"
}
} and run |
We were actually thinking along the same lines so I was just about to try that. And that gives the same errors but then skips it when it fails.
|
And weirdly, I get the same with this, too...
|
and What about |
So, after running Unless you know what's going on there, that looks like I might have some deeper issue here, I'll try reinstalling |
|
So, after seeing those work, I just tried to I never did get around to reinstalling anything, it just suddenly worked... I'm not sure what to make of this now, or whether to consider this a just-me issue that somehow fixed itself, or a My current hunch is that it's something funky in the |
Just to note, I incorrectly said |
To summarise:
Furthermore, there seem to be a number of open issues at TooTallNate/node-weak related to various install issues and crashes that have received no response for a number of months, indicating it may have stability issues. See TooTallNate/node-weak#81, TooTallNate/node-weak#74, TooTallNate/node-weak#73 Even if this is working as intended by skipping, I'd suggest that it looks like EDIT: I'd already tried clearing |
I'm experiencing this problem too. Node 8.9.1 |
This is concerning that the codebase does not match the published npm package for jest-leak-detector. In github the package.json clearly has weak as an optional dependency: https://github.com/facebook/jest/blob/v22.0.4/packages/jest-leak-detector/package.json Yet in the package.json published in npm, it is a dependency.
I originally came across this issue using npm version 3.10.10 and node verison 6.11.3 inside of a nanoserver docker container, so python dependencies for a weak node-gyp rebuild are a no go. |
It's supposed to be in But if the package managers with |
Okay, if that is the case, we should make sure that the pre-compiled binaries are published by weak's build pipeline. https://travis-ci.org/TooTallNate/node-weak/builds/100044569 I believe for that to happen there would need to be an AppVeyor build pipeline in addition to the Travis CI build pipeline to compile the Windows binaries. |
@brittbinler Could you post an error-log or something? What exactly are you experiencing? There seem to be a few semi-related problems mixed into one here. It's interesting that you're seeing something like this on OSX, there goes my theory that it might be a Windows specific issue. |
It seems then that the bug is Yarn specific, since NPM is able to skip the dependency when the binary module is not built (that's based on what people posted earlier). Generally speaking, cc / @BYK or @arcanis could we double-check that Yarn's behavior is the right one? Thanks! |
@mjesun This is not yarn specific, I ran into this using standard npm install. This is an issue with utilizing native node modules like weak which if there is not a binary that matches your OS and node version it attempts to compile the C++ as part of the install process. If you do not have python 2.7 in your path, node-gyp will error out. I suspect the Mac user experiencing this has python 3 in their path, which is not compatible. |
@jaylandro Oh sorry, I just realized that people with |
@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 |
Yeah, I think we might remove the dependency to |
@jaylandro Trying to keep up with the busy discussion :-)
|
@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:
|
Got the exact same issue right now. It hangs here:
ng --version says:
python --version says:
npm --version says:
Thank you in advance for any input. |
Works fine with |
I had the same problem on MacOS. Be sure that you don't have any pending System Update. I've upgraded to macOS 10.13.3 (from the previous minor version) and the problem is gone. macOS: 10.13.3 |
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. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Yarn hangs on
yarn add -D [email protected]
.Works fine with
v21.2.1
.I deleted
node_modules
andyarn.lock
and ranyarn 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
andyarn test
.With
--verbose
: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
The text was updated successfully, but these errors were encountered: