Closed Bug 1282912 Opened 8 years ago Closed 8 years ago

create-test-environment hangs on Node.js commands if installed version of node is too old

Categories

(MozReview Graveyard :: Testing / Development Environment, defect)

Development/Staging
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mars, Assigned: glob)

Details

Attachments

(1 file)

Commit 4391:f1cc4b5a92b1 introduced Node.js into the project build dependencies in order to build reviewboard.  create-test-environment calls "npm init -y" to set up the Node.js installation, but the command hangs waiting for user input if the npm version is too old.

Debian 8 ships with Node.js 0.10.29 and npm 1.4.21.  Ubuntu 14.04 ships with Node.js 0.10.25 and npm 1.3.10.  create-test-environment doesn't check for a specific version of Node.js and npm, so if a developer installs the distro defaults they are likely to have create-test-environment hang or blow up on them.

Even if "npm init" is manually executed, later commands like "npm install less" blow up because they have a requirement of nodejs >= 0.12.
nuts.

we should probably run "node -v" and do a version compare before trying to run "npm init".

note on some linux distros the node executable is installed as "nodejs", so if "node -v" doesn't work we'd want to check "nodejs -v".  ("node" is the correct name, and should be checked first).
Assignee: nobody → glob
create-test-environment hangs waiting for user input on really old node
versions due to the lack of support for the -y switch, requiring us to check
the version of node.

Review commit: https://reviewboard.mozilla.org/r/61186/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/61186/
Attachment #8766179 - Flags: review?(mars)
Attachment #8766179 - Flags: review?(mars) → review+
Comment on attachment 8766179 [details]
testing; Check node version during create-test-environment (bug 1282912);

https://reviewboard.mozilla.org/r/61186/#review58192

I can verify that node 0.12+ is sufficient to build the review board dependencies.  +1
Pushed by bjones@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/b0b29eb4ec13
testing; Check node version during create-test-environment ; r=mars
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: