Closed Bug 1379304 Opened 7 years ago Closed 7 years ago

Update nodejs and npm to their latest versions

Categories

(Firefox Build System :: MozillaBuild, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: RyanVM, Assigned: RyanVM)

References

Details

Attachments

(1 file)

Fixes some ugly issues with npm5 that we don't want to ship. Should just need to add a "npm install -g npm" line to the packaging script.
Summary: Update npm to version 5.1.0 → Update nodejs and npm to their latest versions
Well, this turned into one heck of an adventure, but I finally got it all working.

I first ran into issues with getting npm to update because it was trying to overwrite itself and hitting permission denied errors. I fixed that by calling npm update by way of node.exe (using the same command to invoke npm that npm.cmd uses). That worked for getting version 5.1.0 installed in the stage directory.

The next issue was that due to npm's insane recursive packaging structure, I was hitting maximum path length issues during installer packaging (some were 7 levels deep - ffs). I ended up working around that by installing the flatten-packages module and then running it during packaging. That fixes the problem, but it does introduce a potentially problematic issue with conflicting package versions. However, the cursory testing I've done suggests that things *seem* to be working OK (including ESLint).

Mark, I'd like to have you sign off on all of this since it was more involved than I'd originally hoped it would be and it does introduce some risk. A link to a test build is below for you to play with.
https://drive.google.com/open?id=0BxocUovXDf0iUlR1Nklvemo0ZUk
Attachment #8884969 - Flags: review?(standard8)
Comment on attachment 8884969 [details] [diff] [review]
update npm to the latest version during packaging

Review of attachment 8884969 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Though if you can update us to 5.2.0 (just released) that would be useful as it would fix some more issues we have with npm on Windows.

Note: There do seem to be multiple node versions in the archive, though it could just be my install not removing the old versions on overwrite.
Attachment #8884969 - Flags: review?(standard8) → review+
Thanks for the review!

(In reply to Mark Banner (:standard8) from comment #2)
> Comment on attachment 8884969 [details] [diff] [review]
> update npm to the latest version during packaging
> 
> Review of attachment 8884969 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good. Though if you can update us to 5.2.0 (just released) that would
> be useful as it would fix some more issues we have with npm on Windows.

I'm going to rebuild once more still for Python 3.6.2, so I'll pick up whatever's latest then.

> Note: There do seem to be multiple node versions in the archive, though it
> could just be my install not removing the old versions on overwrite.

Yeah, I'd expect that to not end well (installing on top of an existing installation). I suppose the newly-added flatten-packages would sort that out, though? :)
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/mozilla-build/rev/668f33ec8874
Update nodejs to version 8.1.3.
https://hg.mozilla.org/mozilla-build/rev/a861898229de
Update npm to the latest version during packaging.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/mozilla-build/rev/3c2ccfac7064
Update nodejs to version 8.1.4.
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: