Skip to content
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

bower won't unzip files created with 0.11.0 #127

Closed
jpmec opened this Issue Sep 8, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@jpmec
Copy link

jpmec commented Sep 8, 2014

I have been using grunt-contrib-compress 0.10.0 to create .zip files that are used by bower.
When I switched to grunt-contrib-compres 0.11.0, bower began complaining about the zip files.

Bower version: 1.3.9
Node version: 0.10.28
OS: Windows_NT 6.1.7601 x64
PS D:\Projects\myotherproject> bower install
bower not-cached    D:\Projects\mybrokenproject\python\dist\mybrokenproject-0.5.0.zip#*
bower resolve       D:\Projects\mybrokenproject\python\dist\mybrokenproject-0.5.0.zip#*
bower copy          D:\Projects\mybrokenproject\python\dist\mybrokenproject-0.5.0.zip
bower extract       mybrokenproject#* mybrokenproject-0.5.0.zip
bower error         Unsupported file type "undefined"

Here is the snippet from the Gruntfile used to for the compress task:

compress:
  distPython:
    options:
      archive: "<%= metaPython.distPath %><%= pkg.name %>-<%= pkg.version %>.zip"

    files: [
      expand: true
      cwd: "<%= metaPython.addPath %>"
      src: ["bower.json"]
      dest: "./"
    ,
      expand: true
      cwd: "<%= metaPython.distPath %><%= pkg.name %>-<%= pkg.version %>"
      src: ["**"]
      dest: "./<%= pkg.name %>-<%= pkg.version %>/"
    ]

In general, steps to reproduce are:

  1. Use grunt-contrib-compress to create a .zip file with the following structure:
+ mybrokenproject-0.5.0.zip
|
+- bower.json
|
+- /mybrokenproject-0.5.0
   |
   +- ...other files...
  1. Try to use the .zip file with a bower.json file similar to:
{
  "name": "myotherproject",
  "version": "0.0.0",
  "private": true,
  "dependencies": {
    "mybrokenproject": "D:\\Projects\\mybrokenproject\\python\\dist\\mybrokenproject-0.5.0.zip",
   }
}

I can provide whatever other details are needed.
For now I am switching back to the 0.10.0 version.

@ctalkington

This comment has been minimized.

Copy link
Member

ctalkington commented Sep 8, 2014

sorry to hear you are having issues with the latest version. its possible there is something in the newer archiver that this parser doesn't like. does it open in your os zip program or unzip?

@ctalkington

This comment has been minimized.

Copy link
Member

ctalkington commented Sep 8, 2014

could you do a npm list in your project? its possible your missing a recently released patch or such.

@ctalkington

This comment has been minimized.

Copy link
Member

ctalkington commented Sep 8, 2014

looking into this here:

archiverjs/node-compress-commons#5

@ctalkington

This comment has been minimized.

Copy link
Member

ctalkington commented Sep 9, 2014

please clear npm cache and try now. it should pull in the latest compress-commons@0.1.6

@vladikoff vladikoff closed this Sep 9, 2014

@jpmec

This comment has been minimized.

Copy link
Author

jpmec commented Sep 9, 2014

@ctalkington bower is happy now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.