BeWelcome / rox

:earth_africa: BeWelcome lets you share a place to stay, connect with travellers, meet up and find accommodation on your journey. It is and will always be a free, open source, non for profit, democratic community.
https://www.bewelcome.org
GNU General Public License v2.0
189 stars 53 forks source link

building docker version on fresh arm64 #230

Closed bwmravec closed 3 years ago

bwmravec commented 3 years ago

Hi everyone, I'm trying to build the docker version of rox on fresh ubuntu 20.04/arm64 and getting errors during yarn installation from the latest bootstrap4 branch

[4/4] Building fresh packages... error /srv/bewelcome/node_modules/fibers: Command failed. Exit code: 127 Command: node build.js || nodejs build.js Arguments: Directory: /srv/bewelcome/node_modules/fibers Output: node-gyp not found! Please ensure node-gyp is in your PATH-- Try running: sudo npm install -g node-gyp spawn node-gyp ENOENT /bin/sh: nodejs: not found

where would the best place in the setup to integrate the missing package?

thisismeonmounteverest commented 3 years ago

@bwmravec This is not related to a missing node-gyp it seems. I recently run to the docker setup and that worked without issue.

Searching the web I found a few hits for yarn and node-gyp. fibers might be included with the wrong version because of the arm64 platform.

thisismeonmounteverest commented 3 years ago

Just found this one: https://github.com/RocketChat/Docker.Official.Image/issues/48

bwmravec commented 3 years ago

I can't find where exactly is the nodejs version for docker compilation defined :/

thisismeonmounteverest commented 3 years ago

Unfortunately me neither. Maybe the guy who created the docker support can help.

@vincentchalamon Do you know how to resolve this?

vincentchalamon commented 3 years ago

Hi folks, I'm checking locally with the latest version of the bootstrap4 branch (slow connection, it might take awhile...).

Did you check rebuilding the yarn.lock file? The node packages depends on the system, so if the yarn.lock file has been generated on another system, that could explain the error...

vincentchalamon commented 3 years ago

Successfully built the bootstrap4 branch locally. FYI, the node version is v12.21.0

bwmravec commented 3 years ago

It does build on amd64 without issues, but can't make it work on arm64. How can I refresh yarn.lock for my local system?

vincentchalamon commented 3 years ago

You could try locally: yarn install, it should install the node packages according to your system

thisismeonmounteverest commented 3 years ago

@bwmravec Did you get it working (on your M1 Mac I assume)?

bwmravec commented 3 years ago

@thisismeonmounteverest I didn't make the docker version work on rpi 4 arm64 due some docker bugs, but manual installation worked fine so I went with that.