Feedback on new installer #298

Closed
paulirish opened this Issue Sep 5, 2012 · 45 comments

5 participants

@paulirish
Yeoman member

@tomlane

Okay let's use this ticket to gang up on the new installer. :D

Just ran the latest on my own OS X machine which has most of this stuff already. Only one issue stood out:

Looks like you need to sudo your npm install:

sdlkf  

This was the weirdest moment. It asked me to sudo and it was a random plaintext entry. Typed gobbledygook and seemingly got through.

I then ran into a bunch of permission errors for the rm -r ~/.yeoman call, but that's less of a worry.

cc @sindresorhus

@tomlane tomlane was assigned Sep 5, 2012
@sindresorhus sindresorhus referenced this issue Sep 5, 2012
Closed

Installer #225

@coldhead

I am very pleased to report that this installed without issue for me on a vintage Ubuntu 10.04 system, with Node and NPM pre-installed from the Launchpad PPA repository.

Thank you so much!

@sindresorhus
Yeoman member

@paulirish Can you post the full output in a gist?

I then ran into a bunch of permission errors for the rm -r ~/.yeoman call, but that's less of a worry.

Hmm, maybe we have to run it as sudo just to be sure?

Can you do ls -l in ~?

@tomlane tomlane referenced this issue Sep 5, 2012
Closed

Linux support #221

@tomlane

I'll look in to any straggling bugs tomorrow, so hyped it's landed :D

@paulirish
Yeoman member

also hitting some of this sh: Syntax error: "(" unexpected

trying to narrow down

@addyosmani
Yeoman member

Thanks for confirming @coldhead!

@paulirish
Yeoman member

it looks like we can drop the function from these methods for better linux compat. I'm on Red Hat right now.

@sindresorhus
Yeoman member

@paulirish Yes, the keyword is optional, I personally don't use it. Does it cause problems on Linux?

@paulirish
Yeoman member

Yeah function is. Also this line is triggering some syntax woes:

 echo -ne '\n' | ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)

Also to confirm i have the #!/bin/bash hashbang at the top. Meteor really likes using sh though most docs online prefer bash..

@sindresorhus
Yeoman member

Also to confirm i have the #!/bin/bash hashbang at the top. Meteor really likes using sh though most docs online prefer bash..

But our script is in bash, if we use sh most systems will just redirect to the default shell, which might not be compatible. That's why we're explicit.

@paulirish
Yeoman member

That's why we're explicit.

Yup. I'm fine with that. Here on RedHat sh maps to dash. :|

@paulirish paulirish closed this Sep 5, 2012
@paulirish paulirish reopened this Sep 5, 2012
@paulirish
Yeoman member

git is installed on this box but my package manager can't seem to find the git package and the installer dies.

@sindresorhus
Yeoman member

Here on RedHat sh maps to dash. :|

Exactly ;)

@sindresorhus
Yeoman member

Removed function keyword

@sindresorhus
Yeoman member

@paulirish which git and echo $PATH and brew doctor, paste output pliz.

@paulirish
Yeoman member

I don't consider these blockers btw.. ubuntu is much more important than this red hat box I'm on..

  • homebrew line has offending syntax
  • echo "Now the dependencies are sorted let's grab the latest yeoman goodness" apparently causes sh: Syntax error: Unterminated quoted string
  • after resolving those I rerun and get these two lines outputted right next to eachother, very clearly missing the yeoman DL and install. So odd.. :
Now the dependencies are sorted let's' grab the latest yeoman goo
... might I suggest: 

Anyway, like I said.. not blockers. Going to give a better go on a fresh OS X snow leopard in a few.

@tomlane

@paulirish ah silly me, git-core is the package the script needs to point to, i'll be firing up a few Linux VMs today (Ubuntu and Fedora) to see how it goes,

not too late to put in more changes is it?

@addyosmani
Yeoman member

@tomlane Not too late at all. We might end up delaying the soft launch a little depending on when Bower gets released, so feel free to put more changes in if you feel they're critical.

@tomlane

@addyosmani i'll run the VMs and wait for feedback on OS X compat and see what happens

@tomlane

@addyosmani will definitely be some fixes coming in later, no curl by default on ubuntu makes it crash and burn hard

@paulirish
Yeoman member
@paulirish
Yeoman member

Installing on a fresh OS X box. Got a bug where it looks like it went with sh and not bash, thus not observing the hash bang..?

$ curl -L get.yeoman.io | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9730  100  9730    0     0   2407      0  0:00:04  0:00:04 --:--:-- 12802

Installing on OS X.
sh: line 54: syntax error near unexpected token `('
sh: line 54: `  echo -ne '\n' | ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)'

retrying with curl -L get.yeoman.io | bash

Everything works out, brew is installed correctly, node is installed. But then the brew installs come in...

Installing git...
Warning: Could not locate developer tools. Consult `brew doctor`.
Warning: No developer tools installed
You should install the Command Line Tools: http://connect.apple.com
Warning: Could not locate developer tools. Consult `brew doctor`.

Sass is all aces.

Then I realize what happened with the original issue that opened this ticket:

Looks like you need to sudo your npm install:
npm http GET https://nodeload.github.com/cowboy/grunt/tarball/0ba6d4b529

In the log here these lines are next to each other, but during install there is a 20 second delay between those lines. So the sudo line is coming up even when the sudo isn't required. (If a user does type a password, they'll enter it in plaintext and... I imagine it'll be evaluated as the next command at the prompt.)

@paulirish
Yeoman member

Also fwiw, picked this from homebrew internals:

  def xcode_clt_installed?
    File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb"
  end

Though I am not stressing about this particular issue.

@addyosmani
Yeoman member

The same brew doctor issues Paul noted above can be reproduced. It would be totally awesome if we could nail down the final few issues with the installer today :)

@sindresorhus
Yeoman member

@tomlane Tried it now on a clean OS X with only developer tools installed. Worked perfectly! The only comment is that I was asked for password twice, once at startup and once in the middle:

==> Downloading http://phantomjs.googlecode.com/files/phantomjs-1.6.1-macosx-static.zip
######################################################################## 100.0%
/usr/local/Cellar/phantomjs/1.6.1: 4 files, 9.4M, built in 6 seconds
Password:
Linking /usr/local/Cellar/jpeg-turbo/1.2.1... 25 symlinks created

Full output: https://gist.github.com/7703a65ff2770ef2596b

@sindresorhus
Yeoman member

When it's live on NPM we need to change the installer fetch that instead of the dropbox thingy.

@sindresorhus
Yeoman member

@paulirish curl -L get.yeoman.io | sh didn't work for me either. bash did. You should change the command on the site.

@sindresorhus
Yeoman member

We should do something about the Xcode dev tools requirement.

Currently it just shows a warning message when trying to install Homebrew, but installation continues and fails later on when it needs it.

@tomlane Can we check if it's installed as Paul suggested above, instruct them how to do it and then exit?

This is probably because the Xcode CLI tools are not installed. Could you check for that and if not available echo a instruction on how to install them and exit the script. This check should probably the at the top of the script.
https://developer.apple.com/downloads/index.action

@addyosmani
Yeoman member

I can confirm curl -L get.yeoman.io | sh doesn't work but using the bash option does. Because we'd have to change a bunch of things (screencast, docs) to reflect this, are we absolutely sure theres nothing we can do to fix curl -L get.yeoman.io | sh?

@paulirish
Yeoman member

ping @tomlane if you're around... want to get your thoughts here

@sindresorhus
Yeoman member

^ Fixed in b54da1a :)

@paulirish
Yeoman member

Oh really.

@addyosmani
Yeoman member

yay.

@sindresorhus
Yeoman member

Using sh on OS X apparently run bash in compatibility mode.

@tomlane

Sorry guys, been out all day, I am currently writing this sat on a coach on a blackberry which isn't fun, I've been briefly looking at emails and will take a look at things when I can at the comfort of a laptop :)

@paulirish paulirish added a commit that referenced this issue Sep 6, 2012
@paulirish paulirish better wording on sudo for npm install, as their previous sudo will s…
…till hold in the session. ref #298
a938664
@paulirish
Yeoman member

Okay tweaked the messaging around the npm install sudo prompt ^ .

For this ticket it only leaves the xcode CLI issue. We should check for it using the binaries above and bail if for mac users if it isn't there.

@tomlane

@paulirish , Ok, back at my desk,

not sure if i've mentioned it before but this look like what we are looking for: https://github.com/kennethreitz/osx-gcc-installer it's a base set of compiler and tools for OSX, maybe we could look in to this?

2nd thoughts looking at the size, 200mb+ wouldn't go down well

@paulirish
Yeoman member
@tomlane

Sure thing :) just need to think up a reasonable check for the tools :)

@tomlane

@sindresorhus @paulirish is there a command that is related to the CLI tools i can "which" for?

@sindresorhus
Yeoman member

Do the same as Homebrew (see discussion above-ish):

def xcode_clt_installed?
    File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb"
  end

Check if /usr/bin/clang and /usr/bin/lldb is executable.

@paulirish
Yeoman member
@paulirish
Yeoman member
@tomlane

@paulirish Looking in to it right now :)

@sindresorhus
Yeoman member

@tomlane Tried the very latest and it worked, but I still get asked for password twice, same as before, even with the sudo keep alive. Any ideas?

https://gist.github.com/5efdb198c95d2562ba77

@sindresorhus
Yeoman member

Closing as we're now using audit script instead.

@paulirish paulirish added a commit that referenced this issue Apr 24, 2015
@paulirish paulirish better wording on sudo for npm install, as their previous sudo will s…
…till hold in the session. ref #298
533d57b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment