-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing LTS nodejs 16.13.1 (fix build on arm/v7) #17994
Conversation
And I see a "red light" but I've no idea what is complaining about what (or rather the bot doesn't give any log, which is less than ideal). |
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.
dd17220
to
743be42
Compare
I think this needs more investigation regarding this callback error. Node 14 should be fully supported to build and npm lockfile v2 should be fully backwards-compatible with npm 6.x to my understanding (it only raises a warning). |
It works for me on x86: docker run -it golang:1.17-alpine3.13
apk --no-cache add build-base git nodejs npm
git clone --depth 1 https://github.com/go-gitea/gitea.git && cd gitea
TAGS=bindata make build A search on the
|
Codecov Report
@@ Coverage Diff @@
## main #17994 +/- ##
==========================================
+ Coverage 45.28% 45.33% +0.05%
==========================================
Files 820 820
Lines 90932 90932
==========================================
+ Hits 41179 41225 +46
+ Misses 43194 43154 -40
+ Partials 6559 6553 -6
Continue to review full report at Codecov.
|
@silverwind Anyway, I solved my problem and thought to share it or others that might have the same, if you want the code is there. Your choice. cheers |
I don't think we can accept such crude copying of |
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 😅