Do you want to request a feature or report a bug?
bug
What is the current behavior?
Install fails with this stack trace:
Trace:
Error: https://registry.yarnpkg.com/eslint-plugin-getsentry/-/eslint-plugin-getsentry-2.0.0.tgz: invalid tar file
at Extract.Parse._startEntry (/usr/lib/node_modules/yarn/node_modules/tar/lib/parse.js:149:13)
at Extract.Parse._process (/usr/lib/node_modules/yarn/node_modules/tar/lib/parse.js:131:12)
at BlockStream.<anonymous> (/usr/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/lib/node_modules/yarn/node_modules/block-stream/block-stream.js:145:10)
at BlockStream.flush (/usr/lib/node_modules/yarn/node_modules/block-stream/block-stream.js:70:8)
at BlockStream.end (/usr/lib/node_modules/yarn/node_modules/block-stream/block-stream.js:66:8)
at Extract.Parse.end (/usr/lib/node_modules/yarn/node_modules/tar/lib/parse.js:86:23)
at UnpackStream.onend (_stream_readable.js:511:10)
If the current behavior is a bug, please provide the steps to reproduce.
Installing dependencies using this command: yarn
Please mention your node.js, yarn and operating system version.
Node: 6.9.1
Yarn: 0.16.1
Dockerfile: https://github.com/sdelements/gitlab-ci-runner/blob/master/Dockerfile
This line looks broken:
yarn/src/registries/npm-registry.js
Line 53
in
96fbeea
.
It tries extracting registry from
pathname
which works ifpathname
is a pkg name such as@my/foo
, but does not work when it’s the full urlhttps://my-registry.com/@my/foo/download/@my/foo-1.7.0.tgz
.This means the auth token is not used when downloading the tarball. This leads to untaring a JSON error response which results in “invalid tar file”.
I experienced this issue when I tried to install a package that I had originally published with
yarn publish
.I then bumped the version and republished the package with
npm publish
. I was then able toyard add
the package without issue.Is this an issue with
yarn publish
then? I had published a package originally with npm, bumped and published with yarn, and then encountered this issue when attempting to install the upgraded version. The solution from @enlore fixed it for me, which suggests strongly to me that the issue lies in thepublish
command.This is sadly still an issue as of yarn v0.23.2.
Reporting as of May 14, 2017, that😄
yarn publish
seems to be borking things.npm publish
works though