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

Ensure recent Node.js and npm version #18

Closed sindresorhus closed 9 years ago

sindresorhus commented 9 years ago

Added checks to make sure the user is running on a recent Node.js and npm version. A big amount of the issues we get are related to outdated Node.js and npm versions, so I think this can help bring that down.

screen shot 2015-06-05 at 18 29 59

This module is run everytime someone installs yo, which currently has almost 30.000 downloads a week. Getting more people on recent Node.js and npm versions will benefit the whole ecosystem greatly.

// @SBoudrias @addyosmani

@othiym23 @zkat Fyi, and let me know if you have any improvement suggestions to the npm message ;)

SBoudrias commented 9 years ago

Code LGTM. Is there a reason the x is standing on a line alone in your screenshot?

About the version stuff, I'm not 100% sure about raising an error for Node.js being older than 0.12. We still support 0.10, and maybe we should only add this in once we stop supporting that version.

arthurvr commented 9 years ago

About the version stuff, I'm not 100% sure about raising an error for Node.js being older than 0.12. We still support 0.10, and maybe we should only add this in once we stop supporting that version.

I actually like the fact that we're already warning if the user is one version behind.

SBoudrias commented 9 years ago

My concern is it might be annoying for teams with a codebase running on 0.10 and not ready to update to 0.12 - and what about people on io.js?

sindresorhus commented 9 years ago

Is there a reason the x is standing on a line alone in your screenshot?

Fixed in https://github.com/yeoman/doctor/commit/3add04e3a1ecea523ac62a5a01b4956b9db391d2

About the version stuff, I'm not 100% sure about raising an error for Node.js being older than 0.12. We still support 0.10, and maybe we should only add this in once we stop supporting that version.

There's a difference with recommending and enforcing. Even though we're nice a still allow 0.10.0 there's absolutely no reason devs should be running that old of a version in a dev environment.

My concern is it might be annoying for teams with a codebase running on 0.10 and not ready to update to 0.12 - and what about people on io.js?

These are developer tools for dev environments, not servers. io.js has higher versions and will never report.

Any idea why tests are failing? Passes fine for me locally.

SBoudrias commented 9 years ago

Not sure why the tests started to fail... But it has to do with npm link:

$ npm link
/home/travis/.nvm/versions/node/v0.12.4/bin/yeoman-doctor -> /home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/yeoman-doctor/lib/cli.js
/home/travis/.nvm/versions/node/v0.12.4/lib/node_modules/yeoman-doctor -> /home/travis/build/yeoman/doctor

Why is there no yodoctor?

arthurvr commented 9 years ago

The cause of this is https://github.com/yeoman/doctor/commit/c544c8d90a3d2de5f6a80bbb0212576bf55679e2.

sindresorhus commented 9 years ago

:tired_face: :facepunch: Fixed.

arthurvr commented 9 years ago

Thanks @sindresorhus!

othiym23 commented 9 years ago

@sindresorhus :+1: to that messaging, which is basically what we tell people as well. You can say npm install -g npm@latest if you want to get super pedantic, but it shouldn't be necessary.

arthurvr commented 9 years ago

:+1:

sindresorhus commented 9 years ago

Thanks all. Landed :)