Installing LTS nodejs 16.13.1 (fix build on arm/v7) #17994
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alpine's outdated node package doesn't play well with package-lock V2
This pulls the current long term support binaries from a more recent
alpine image rather than installing the registry's old one.
Why this patch: I tried to build a docker image for my raspberry pi for the better part of a day (both directly on the pi as well as on my computer using buildx). It kept falling all the time and stopping around Makefile's line 709 complaining some javascript callback
cb()
wasn't getting called. I tried to investigate the whereabouts of thatcb()
but I was unsuccessful.At the same time, I noticed npm was consistently comparing about expecting a
package-lock
file V1 and instead of getting a V2, and ultimately blaming on its self the failure.That prompted me to check what version of node was been installed and, with my great dismay, I was facing an ancient 14.*
At that point getting node to at least an LTS version was the sensible way to go. So here it is. Tested and working with buildx for
linux/amd64
,linux/arm64
,linux/arm/v7
.This can potentially be great for other fellow raspberry pi users like me as (even with the fix) building something like gitea on a raspberry pi is not exactly a great experience 😅