volojs / volo

Create front end projects from templates, add dependencies, and automate the resulting projects
https://volojs.github.io/
Other
1.41k stars 99 forks source link

Node 0.8.22: Unable to find end of central directory record #158

Closed phated closed 4 years ago

phated commented 11 years ago

This doesn't happen every time, but often enough.

When running volo add on travis-ci with node 0.8.22, I often get the message ERROR: Error: Unable to find end of central directory record

See https://travis-ci.org/iceddev/frozen/jobs/6893229 for an example.

I have tried modifying my repo in many ways to solve this problem but it seems to be a problem with the zip files. Not sure if something in volo is changing them or the Github API has changed or is being flakey.

jrburke commented 11 years ago

It could be a problem with the version of zip I am using. I have it pegged at 0.0.6, but looks like there is a 1.1.0 out. Will update to the latest. If you wanted to try something hacky in the meantime, you could go to the volo installation directory and manually force zip 1.1.10, maybe by modifying the package.json. No guarantees that hack will work though, not sure if it changed APIs or may require other updates.

phated commented 11 years ago

I updated to the latest zip module in a fork and it passed all the tests. Then, I modified the branch I have been working in to use that fork and pushed to travis, which ran completely on both node 0.8.22 and 0.10.2 (ref build). The issue has typically been spotty, so I can't say that it is completely fixed. Though, It is a good sign and I will keep this updated on whether it fails again.

jrburke commented 11 years ago

Fixed in 9304919d9b8bd2c3e53e1bbc97628508337156e3

Did some work on a plane and did not have access to github issues area, so could not mention the fix number in the commit.

phated commented 11 years ago

This seems to still be happening with 0.3.0

phated commented 11 years ago

If I were able to swap https://github.com/nearinfinity/node-unzip for the zip dependency, would that be okay? Bower seems to be using the unzip library.

Scratch that, the library that Bower uses has big problems on Node 0.10.

On another note, I can't get this error to occur on node 0.8.22 on my local machine, but it is still happening on travis - I guess I need to look into it some more.

jrburke commented 11 years ago

I was having trouble getting all the unit tests to pass with node 0.10. The error seemed to be related to the http module, seemed to fail on a certain kind of request, but I could not reproduce when I tried each of the test volo adds by themselves. Very frustrating.

I still feel like node and its ecosystem is adjusting to the changes in 0.10. It could also be a q interaction with 0.10 too.

In any case, when you run in travis, does it use node 0.8 or 0.10?

It would help in any of these cases if we could get something we could reproduce on our local dev machines too. That would decrease the frustration level if we could start to isolate what is causing the problem.

phated commented 11 years ago

0.10 seems to always be working on travis. 0.8 is the one that keeps producing the error. I could see http being the culprit if it wasn't pulling down a zip correctly. Another note, this seems to be happening against github dependencies.

jrburke commented 11 years ago

Huh, OK, well so much for the "0.10 seems uneven" theory, if 0.8 is failing on travis.

When you say "happens against github dependencies" do you mean fetching .zip files of github repos or something else? If .zip files of repos, then what kinds of .zip files do seem to consistently work?

phated commented 11 years ago

Urls such as https://codeload.github.com/bestiejs/lodash/legacy.zip/master

We don't grab any other types of .zips.