-
Notifications
You must be signed in to change notification settings - Fork 436
Where can we reliably get phantomjs-X.X.X-linux-x86_64.tar.bz2? #509
Comments
The main PhantomJS project is looking for a sponsor for a downloads, see: Personally, i think this is a tragedy-of-the-commons problem: people are incentivized to waste resources because the resources are free. Adding more resources doesn't fix the problem because it doesn't fix the incentives. This installer package tries a few different strategies to cache the download locally, but there's only so much we can do. Also, minor question, re: "Okay, so I install it from disk locally, but then I'm locked into no updates". I don't see why that's true? The installer package will check if the version on disk is the correct version. |
What about https://rawgit.com/ ? |
I administer a CI server that builds many different projects which can potentially use many different versions of PhantomJS. Our best effort is kept to keep them the same version but its not guaranteed because of subdependencies and some projects not wanting to take the risk of changing versions. But most of our projects are at phantomjs-prebuilt 2.1.6 (phantom 2.1.1). I've got this version also globally installed on the server. So I'm expecting all of the projects to just use the globally installed version when building/testing etc. However this is not the case. It seems like the install script detects that phantomjs-prebuilt is globally installed but decides to skip it and download the file anyway from the CDN.
When I type |
Okay I figured out that this is because of the way phantomjs is installed globally when using npm. Could there not be a way for Installing phantomjs-prebuilt globally with npm is the most convenient way to install phantomjs at a given version and hence also getting local npm installs to stop wastefully downloading the binaries from the CDN. |
@denodaeus : how do you use a local version? |
@chriwup: I know that code looks weird but it does work. It shouldn't be throwing an exception when reading a binary file, it just surely won't find "NPM_INSTALL_MARKER". That thing is there because if you NPM install |
i changed it to use github releases by default, we'll see how that goes |
Would it be possible to use npm's cache to store the downloaded binaries? That would alleviate some of the burden on whatever hosting service ends up being used. It would also provide more reliable caching than simply relying upon tmp. That would let you resolve #466. |
Here is what happened in my case:
Wouldn't it be easier to just check the filesize, if it's greater than 1MB we can safely assume it's not the javascript file we're looking for (jedi trick) but the binary file. In that case we just avoid loading it as an UTF-8 string (note: @frank-weindel what I see here is clearly an exception). |
Please help, this is super annoying. Committing a 23MB file to our repo and keeping track of this doesn't sound fun either.
The text was updated successfully, but these errors were encountered: