-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
error Bad hash installing git+https dependency by branch #3309
Comments
I can use an older |
I've encountered the same problem today. The yarn.lock file resolves the branch/version entry to the commit hash of the target git repo and creates a zipped file within the offline mirror folder. Unfortunatly, I was not able to work around this problem yet, so I dumped the offline mirror for the time being. |
I am also seeing this same behavior with Yarn 0.23.2 |
I am also seeing this issue with Yarn v0.23.4 |
I am also seeing this issue with Yarn v0.24.5 |
I am also, also seeing this on Yarn v0.24.5. If you'd like a terrible terrible workaround, I found one. Change the hash in your yarn.lock and your offline mirror filename to match what yarn in expecting (the sha hash of the tarball). If everything matches up, yarn will install from the tarball without inspecting the fake git hash. |
The error message's expected hash actually matches the git commit hash. The For the older code to work, something would have to set the |
I think I'm hitting this condition while trying to build an application offline (with npm cache) which includes plotly. Plotly (and its dependencies) fail here. |
Couldn't reproduce with |
@ericgundrum - Can you confirm that this is resolved on master at least? (or update the instructions so I/we can repro) |
@ericgundrum What do you mean, the git repo dependency is no longer being stored in the offline cache? It should - the only change in #3449 is that it disables the hash check, since we're currently storing inadequate data in our lockfile when it comes to git repos. This issue should be resolved, going to close it 👍 Next step will be to move the hash into an external field, but that's another task. |
@arcanis To test this in the
Am I wrong to expect |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
error Bad hash.
If the current behavior is a bug, please provide the steps to reproduce.
(The relevant repo snapshot is a0aac3d.)
What is the expected behavior?
Install all dependencies.
Please mention your node.js, yarn and operating system version.
macOS 10.10.5
node v7.9.0
yarn v0.23.4
yarn v0.24.0-20170502.1431 also fails
yarn v0.23.0-20170331.1019 also fails
yarn v0.23.0-20170327.1305 suceeds
Note package.json line 23 specifies a
git+https
url with a branch label.Changing the label to a commit hash avoids the failure.My 'yarn config' might matter; I use
yarn-offline-mirror
The text was updated successfully, but these errors were encountered: