Closed udf2457 closed 6 years ago
This is solely tied to the phantomjs dependency so I suggest searching there.
Also please try it without sudo.
See https://github.com/Medium/phantomjs/issues/659 for multiple solutions.
So bzip2
is probably missing.
More related issues: https://github.com/Medium/phantomjs/issues?q=is%3Aissue+no+such+file+is%3Aclosed
Usage of sudo
is as per the reason given in your very own docs. ;)
Thanks for the link to the phantomjs. Will give those a go.
With sudo
is not the first recommended way to install it but can be used if there are permission errors and you are not in a elevated commandline session.
https://foundation.zurb.com/sites/docs/installation.html#install-with-foundation-cli
Or where is it explicitely mentioned that users should run it with sudo
? We should change the docs then.
Hi @udf2457, did you find a solution?
@DanielRuf Yeah, its called Bootstrap 4. :-)
Before I posted here I'd already spent a day trying to figure out the vague error messages coming from "foundation new". So I had to go the competition as it was an urgent requirement. Hopefully Foundation 7 will adopt a little more "fail gracefully" mantra.
But I digress, rant over. I will try to find a moment tomorrow to test again, too busy today.
It is not a bug in Foundation but an issue related to Phantomjs and your environment as it seems so far. The next release will use puppeteer.
@DanielRuf Yeah, its called Bootstrap 4. :-)
If installation is your priority and not to have the better framework it may be a solution for you. However as @DanielRuf already pointed out it's not a bug in Foundation but in phantomjs.
You can give it another try by following the link he posted (https://github.com/Medium/phantomjs/issues/659) and install bzip2
before running foundation new
@SassNinja @DanielRuf
Not wishing to go all philosophical here, but the sort of attitude displayed here is one of the key stupidities of the whole open source panacea (don't get me wrong I'm a big supporter of open source, but some of the prevalent attitudes are just silly).
In any other world, if your code depends on dependencies then its pure common sense that dependencies further down the tree are not ignored. It makes for a better end-user experience. If you know (I assume is the case here, I have not yet re-tested) phantomjs
has a dependency on bzip2
then a one-line addition in the docs (or, better still, the logic incorporated into foundation new
) would save a lot of frustration, confusion and wasted debugging time.
But in open source, no.... it just seems its just fine and dandy to include any old third-party dependency and leave it up to the end-user to debug stuff (frequently relying upon obscure and poorly written error messages) when the muck hits the fan.
but some of the prevalent attitudes are just silly
Not sure what you mean. phantomjs is a thirdparty dependency where we have no control over it. bzip2 is a depenendency of it and not known to us that it is required so far. Also we switched to puppeteer in the current develop branch.
dependencies further down the tree are not ignored
Like we already wrote, bzip2 seems to be required by phantomjs or npm to unpack it but this is not an issue with Foundation but with every project that uses phantomjs that you install on your machine.
If you know (I assume is the case here, I have not yet re-tested) phantomjs has a dependency on bzip2
No, we ware not aware of this as so far no one reported a similar issue or they could solve it and searched for the issue in the issues of phantomjs and npm.
phantomjs has a dependency on bzip2 then a one-line addition in the docs
That should be in the phantomjs docs, not ours. Also we do not use phantomjs anymore (the next release scheduled for this month will use puppeteer).
But in open source, no.... it just seems its just fine and dandy to include any old third-party dependency and leave it up to the end-user to debug stuff
So far phantomjs is and was used by many opensource projects and they all face similar issues as phantomjs is not actively maintained anymore and Medium took over but did also not push the further development as Chrome headless finally arrived and now many use Chrome headless solutions.
any old third-party dependency
It is not any, phantomjs is used in many projects and the prebuilt package is not so old.
(frequently relying upon obscure and poorly written error messages) when the muck hits the fan.
The error message comes from npm and phantomjs, not from us. We have no control over the error message of other packages.
Sorry but we are all just people investing our free time to work on opensource projects and it is almost the same even in big projects. If people would pay for it and more people would contribute and help fixing things in the opensource world, then it would look different.
(frequently relying upon obscure and poorly written error messages) when the muck hits the fan.
The error message comes from npm and phantomjs, not from us. We have no control over the error message of other packages.
That should be in the phantomjs docs, not ours.
This is exactly the point I'm making !
Who's calling phantomjs
? You are ! Do I have any use for phantomjs
outside of whatever foundation new
is calling it for ? No, I never even heard of phantomjs
before this whole saga came up !
But whatever, hopefully your new puppeteer version will behave better with its dependencies. Until then I'll be staying away from the present version.
Phantomjs is a headless webkit solution and is used for the unit tests so it was part of the devDependencies
.
You can manually install foundation-zurb-template
without dev dependencies using npm install --only=production
But you can always globally install phantomjs on your path too. Also the bzip2 dependency is still not a thing that we are responsible for. And the fix is easy here: install bzip2 ;-)
Closing as this is not a bug in Foundation or in phantomjs in general as this is just a missing native system dependency in my opinion.
I've tried this on different Linux flavours and the problem is consistently reproducible.
sudo npm install --global foundation-cli
foundation new
with the follwing options:The below output is from my attempt on Fedora 27, prior to that I tried Centos 7. It doesn't matter if I install NPM via yum or NPM direct repo.