-
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
Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped? #5536
Comments
what is the URL that you are using? my guess it that it is malformed in some way. |
The URL is a private git lab repository, it is private to the company I work in. I have noticed that forking the repo and yarn adding it straight from the fork url (instead of cloning and republishing) doesn't work either - I get an error: |
I can fork that repo on GitHub and it seems to at least try to install. I had to edit package.json because the package was marked private and didn't have a version. I don't have
|
Judging from the output message, it would seem like maybe your registry isn't returning a proper .tgz file, which yarn requests using the |
I just edited my comment to refer to this ^ In that case, what is your suggestion? |
Could you try adding I noticed these that it uses to decide that the URL is to a git repo:
so I think since you are using a private repo, it doesnt match the hard coded domain names, then falls back to the regex matches Adding a |
looks like adding |
same issue trying to "yarn add node-fetch && yarn install" (yarn 1.7.0):
(npm works). adding .git to the URL does not help |
Same issue trying to install Vue CLI 3.0 with yarn while installing with npm works fine.
|
This throws on trying to Example: It'd be really nice to be able to do this as it'd kinda version lock to that commit (i.e. prevent maintainers from screwing over users by force pushing a breaking change). https://yarnpkg.com/lang/en/docs/cli/add/#toc-adding-dependencies docs kinda lead me to believe the commit URL thing would work.
|
Dealing with similar issue when I have tried to add a tgz dependency in the package.json Even when I have added .git`` as you recommended in the url, it does not work. Error message: Forcing consumer to install my package throw tgz file I am "preventing" use the source code instead the transpired / compiled. Any suggestion? |
I started getting this error for a package yesterday, anyone else? |
Getting the same error while I mentioned "@stevenmasini/react-native-fast-image": "https://test-uat2.gymboree.com/rwd/third-party/react-native-fast-image-v7.0.3.tgz", in package.json file. Any solution? |
Sorry to crack this open and Spam everyone. I didn't see this workaround mentioned. I had to fully qualify the URL, ie, change this line (which already had
...to:
That's one of our privately hosted React packages. Just drill into it in your GitHub GUI, and do "Copy URL". Then |
Do you want to request a feature or report a bug?
I'd like to report a bug.
What is the current behavior?
After cloning a repository and uploading it to a private repository I try to run
yarn add ...repo url
I get:
error An unexpected error occurred: "https://...": Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?".
If the current behavior is a bug, please provide the steps to reproduce.
yarn add ...repo url
in a project directory.What is the expected behavior?
Adding the forked package to my dependencies.
Please mention your node.js, yarn and operating system version.
OS: MacOS High Sierra 10.13.3 (17D102)
yarn v1.5.1
node.js v8.9.4
yarn-error.log:
The text was updated successfully, but these errors were encountered: