Yarn: Yarn unable to install from .zip files

Created on 13 Oct 2016  路  6Comments  路  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?
feature
What is the current behavior?
if the file being loaded is a zip, the error invalid tar file is returned
If the current behavior is a bug, please provide the steps to reproduce.
save this into bower.json

{
  "name": "app",
  "version": "0.0.1",
  "dependencies": {
    "bootstrap": "http://getbootstrap.com/2.3.2/assets/bootstrap.zip"
  },
}

and run yarn
What is the expected behavior?
The files in the zip should be extracted and added to node_modules
Please mention your node.js, yarn and operating system version.
node v 5.7.0, yarn v0.15.1, Latest MacOS

cat-bug cat-compatibility

Most helpful comment

Opened a separate feature request since this is no longer relevant for Bower support.

https://github.com/yarnpkg/yarn/issues/1483

All 6 comments

Confirming this when using local zips as well, e.g. (from package.json):

...
    "my-local-zip: "file:./bundled/my-local-zip.zip"
...

Running yarn install yields:

error Couldn't find a package.json (or bower.json) file in C:\Users\MyUser\MyProject
\bundled\my-local-zip.zip

However, there is indeed a valid package.json in the zip file, and installation works fine if you unzip manually, remove the .zip for the module in package.json, and then run yarn install again.

Environment details:
OS: Windows 7 Enterprise
Node: 6.9.1
Yarn: 0.16.1

We've removed support for Bower, see #1441.

This doesnt address the error here though. If we reference to a zip file in package.json this error would still be thrown

npm doesn't support zip files either.

fair enough but that doesn't mean that yarn can't or shouldn't

Opened a separate feature request since this is no longer relevant for Bower support.

https://github.com/yarnpkg/yarn/issues/1483

Was this page helpful?
0 / 5 - 0 ratings