Do you want to request a _feature_ or report a _bug_?
_bug_
What is the current behavior?
package.json:
...
"lib": " https://USER:[email protected]/Elksimo/lib.git"
...
error https://dangreen:[email protected]/Elksimo/lib.git: invalid tar file
at Extract.Parse._startEntry (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/tar/lib/parse.js:149:13)
at Extract.Parse._process (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/tar/lib/parse.js:131:12)
at BlockStream.<anonymous> (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/tar/lib/parse.js:47:8)
at emitOne (events.js:96:13)
at BlockStream.emit (events.js:188:7)
at BlockStream._emitChunk (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/block-stream/block-stream.js:145:10)
at BlockStream.flush (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/block-stream/block-stream.js:70:8)
at BlockStream.end (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/block-stream/block-stream.js:66:8)
at Extract.Parse.end (/usr/local/Cellar/yarn/0.15.1/libexec/lib/node_modules/yarn/node_modules/tar/lib/parse.js:86:23)
at UnpackStream.onend (_stream_readable.js:512:10)
If the current behavior is a bug, please provide the steps to reproduce.
yarn add https://USER:[email protected]/PRIVATE/REPO.git
Please mention your node.js, yarn and operating system version.
$ yarn -V
0.15.1
$ node -v
v6.3.0
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.12 (16A323)
Kernel Version: Darwin 16.0.0
In 0.16.0 this fixed
yarn 0.16.1, node v6.9.1, Linux. Having the same issue with private npm repo.
yarn 0.16.1, node v5.12.0, mac osx. Having the same issue with private repo also. We're using artifactory.
I had to do some cleaning and yarn/npm login/logout to fix that problem
I did a npm logout/login
npm cache clean
yarn cache clean
Still seeing the invalid tar file issue.
@rkurbatov Do you recall any other details that you may have had to do?
@landonpoch try to remove .npm and all .yarn* folders at your home folder and .npmrc file
@rkurbatov @landonpoch don't know if this helps or hinders, but I have the same problem using NPM-hosted private packages on both Heroku (not with Docker) and Docker running locally, both clean environments. For reasons I can't determine though, I don't get the problem on my local, non-Dockerised Mac OS environment.
Just published a package with yarn 'swiper-thumbnails' and tried to add it in a project and fails with error message 'invalid tar file'.
Have the same
[2/4] Fetching packages...
error http://privaterepo/fsevents/-/fsevents-1.0.15.tgz: invalid tar file
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, open 'C:\\Users\\***\\AppData\\Local\\Yarn\\cache\\npm-fsevents-1.0.15-fa63f590f3c2ad91275e4972a6cea545fb0aae44\\.yarn-metadata.json'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\projects\\**\\**\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
yarn 0.16.1 mac - have this issue with private npm registry (with token etc..).
the error isn't clear - is it because it can't find or doesn't have access to the package?
Same problem on Ubuntu Linux, Yarn 0.17.10
@lior-a
yarn 0.16.1 mac - have this issue with private npm registry (with token etc..).
I think that it is related https://github.com/yarnpkg/yarn/issues/547
Same problem on OSX, Yarn 0.17.10 and custom registry (private sinopia)
same issue as @landonpoch while using Artifactory. No issues on my local machine but fails all over the place during the travis build.
Confirmed this is only an issue when working with the private npm repo. No issues when pulling from the global registry.
I think I've cornered the issue. I was using yarn publish to publish a scoped package. Attempts to then yarn add or npm install that package would result in the cb error. I switched back to the classic npm publish and things appear to be A-OK. I don't have additional details on what might be causing issues during yarn publish but if anyone's got tips on how to debug that, happy to help out.
Should we re-open this issue? Why was it closed?
having this same issue. yarn publish seems to work correctly. yarn install in another location results in
error An unexpected error occurred: "https://registry.yarnpkg.com/translation-io/-/translation-io-0.0.4.tgz: invalid tar file"
I took a look inside the tarballs, extracted using the built in utility on macOS Sierra
in 0.0.4 (as above), the lib/ and src/ folders are both empty, however there is a valid-looking package.json, LICENCE and README.md.
LInks to tarballs:
The repo is public. you can take a look here. If I publish using npm publish, everything works, so you can see that there is a problem with how yarn is packaging the tarball or shipping it to NPM.
I'll also note that when using yarn publish, I used the CLI to update the package.json version, rather than when using NPM where I updated it myself.
This could be an issue with yarn publish. I tried installing a package published by yarn but got the same error. Then I unpublished my package from npm and published it again this time using npm publish. Now it seems to be working fine.
I'm on yarn v0.21.3 on a Linux machine.
I'm still having this issue on yarn v0.20.3 with a scoped package.
Most helpful comment
Should we re-open this issue? Why was it closed?