yeoman / doctor

Detect potential issues with users system that could prevent Yeoman from working correctly
http://yeoman.io
BSD 2-Clause "Simplified" License
61 stars 17 forks source link

Less Threatening Node Version Potential Issue Message #22

Closed CWSpear closed 9 years ago

CWSpear commented 9 years ago

If you install yo on Node 0.10.x (which meets the requirements in yo's package.json), you get the following warning from yodoctor:

✖ Node.js version

Your Node.js version is outdated.
Upgrade to the latest version: https://nodejs.org
...

Found potential issues on your machine :(

Either this "warning" seems a little more severe than it is (I believe this to be the case), or if this is really gonna cause issues (running on 0.10.x), yo needs to be more clear on what version(s) of Node it can run on.

If perhaps, it still runs fine on 0.10.x, but you're just suggesting to update, the message could better reflect that:

⚠ Node.js version

Your Node.js version is outdated. Yeoman will work on this version of Node.js, but [insert reasons (speed, security, 3rd party module support), etc here].
Upgrade to the latest version: https://nodejs.org
...

(omit "Found potential issues" message if this is the only issue)
sindresorhus commented 9 years ago

There's absolutely no good reason for devs not to upgrade other than laziness. Yo runs on devs systems, not on servers. Yo will probably work fine on Node 0.10 in the foreseeable future, but we want to encourage people to upgrade for their own and communities benfit.

CWSpear commented 9 years ago

It's trickier for the Enterprise peeps and 3rd party stuff. We are using 0.10.38 and lots of modules that need to be compiled on docker for development (for one, grpc does not like Mac!). We either can't use Yeoman to install anything and use it on the host with 0.12.x, or else deal with this message (which is not at all a big deal, we'll totally survive! Just thought I'd help my team (and others in similar situations) out by saving them from dealing with the ominous message).

SBoudrias commented 9 years ago

Out of curiosity, @CWSpear why do you run Yeoman inside of docker though? Couldn't yeoman only run on the dev environment and edit files in the docker shared folders?

CWSpear commented 9 years ago

@SBoudrias Yeoman could be ran outside of docker, but it couldn't do stuff like npm install unless it was inside docker. My thought was just to tell people to run it inside of docker.

SBoudrias commented 9 years ago

@CWSpear what if you also mount node_modules folder inside docker?

I use docker and never had to run Yeoman inside of it. This really seems like more complicated than it needs to be. I actually never ssh into my docker containers to run anything. They're just use to run my code/test in a specific environment.

CWSpear commented 9 years ago

@SBoudrias we have several modules that are compiled-on-install. For example, grpc won't even install on Mac without extra effort (if at all. Everyone's given up and decided to just use docker before getting it to work). And I would assume (with good reason) that that version wouldn't run in the docker instance.

CWSpear commented 9 years ago

@SBoudrias i.e. if I run npm install on my Mac, it (tries to) compile grpc for whatever version of Node I have against my Mac, instead of 0.10.38 against i.e. centOS.

SBoudrias commented 9 years ago

@CWSpear Got it, that make sense. I wonder if you could watch/rebuild your docker anytime you change something in your shared folder.

CWSpear commented 9 years ago

Mostly what we've been doing is connecting to the main docker container (linking everything to it), then just running npm install if it's the first time and then we can just do npm test (or mocha specific.test.js, set up test watchers, etc) on the inside. We will sync folders so any changes are synchronized and we can dev normally on the host machine and just need to run tests/npm install (if it's something that needs to be compiled) on the boot2docker vm.