Closed Bug 1416257 Opened 8 years ago Closed 8 years ago

Make it easier for contributors to set up a non-VM node environment that doesn't result in errors

Categories

(Tree Management :: Treeherder, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

<jmaher> I installed node v9.1.0, and when running |yarn install --no-bin-links|, I get error that node is not v.8.9.0 <jmaher> it seems that every time I work on treeherder, it is sort of an exercise in frustration- only in setting up the environment <wlach> jmaher: I would try downgrading to 8.9.0 <wlach> or 8.9.1 I guess <jmaher> yeah, I am not sure how, looking into it <wlach> it doesn't pay to be on the bleeding edge with development tools <jmaher> :) <jmaher> ack, I found 8.9.1 and that fails <jmaher> ok, found 8.9.0, lets see if this works <jmaher> ok, that works, now to fix the next error <jmaher> got it running, this was <30 minutes- one of my faster times to get going :) ... <emorley> node 9 is still considered bleeding edge, 8.x is the LTS release <jmaher> yeah, 8.9.1 is lts as of 3 days ago, but I needed 8.9.0 from oct 31st <emorley> so one of the problems is that the node version given in package.json is what is used to build on Heroku. So we generally want to pin that to an exact version (in this case 8.9.0 since it hasn't yet been manually bumped by one of us in the 3 days since 8.9.1 was released). However as of yarn > v1, it complains if the version installed doesn't match <emorley> that version. Now if there was a major mismatch (eg node 6 vs node 8) then that's a good thing, since it ensures people aren't hitting breakage due to not realising they are on an ancient version <jmaher> maybe the installation docs could say the version needed, that would be my only ask <emorley> we could relax the range by using eg "8.x" in package.json, which would suppress the warning locally, so long as you are on the same major version (which wouldn't have helped for your 9.1.0 admitedly, though again I think that's ideal) <emorley> however then on Heroku it would install the latest 8.x and not be pinned <emorley> (perhaps that's ok -- would mean less bumping for us) <emorley> Also, there is an option to yarn (`--ignore-engines`) that disables this check <emorley> Yeah the docs could say that - but they'd have to be kept in sync - and really the error message you are seeing *are* the docs saying what version. Perhaps the docs need to just say "if you see a warning about node version, either install that version (but be aware things may not work) or else use `--ignore-engines`"
Blocks: 1416266
Attachment #8930073 - Flags: review?(cdawson)
Attachment #8930073 - Flags: review?(cdawson) → review+
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/b472a631767d83e92c838a13dc4e8f2b36473248 Bug 1416257 - Docs: Remove unnecessary `yarn install` steps The vagrant provision runs `yarn install`, so it isn't necessary to do so again before running `yarn start`. https://github.com/mozilla/treeherder/commit/5d1b99fa7940dbf601167b1698d5329374822406 Bug 1416257 - Docs: Clarify which node/yarn version should be used Since for people installing node/yarn on their own (outside the Vagrant environment) it can be confusing to work out which version is appropriate, given node always has both an LTS and current release. https://github.com/mozilla/treeherder/commit/69f07fa84e6a431b6a60646c84a3742a3df29996 Bug 1416257 - Disable yarn strict engines mode using .yarnrc As of yarn 1.0+ if the version of node or yarn doesn't match that specified in `package.json`, yarn commands will fail to run and complain about incompatible versions. Unfortunately the error message doesn't really make it clear that the user has the wrong version installed, and instead gives the impression something is broken with Treeherder. In addition, much of the time the exact version isn't important, so the user doesn't need to go to the trouble of changing their node installation. As such, we just disable the yarn engines check for now.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: Treeherder: Docs & Development → TreeHerder
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: