I am trying to get Meteor running in a Node JS ARM based container.
My understanding is, that Meteor since some versions ago, has ARM support, so this should work. (I know, I need to get an external Mongo.)
Now, what puzzles me, is that the installer gives me the following error.
[1/2] STEP 11/16: run npm install -g meteor
/home/node/.npm-global/bin/meteor-installer -> /home/node/.npm-global/lib/node_modules/meteor/cli.js
> **firstname.lastname@example.org** install /home/node/.npm-global/lib/node_modules/meteor
> node cli.js install
The current architecture is not supported in this version: arm64 . **Try Meteor 2.5.1-beta.3 or above**.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! email@example.com install: `node cli.js install`
npm ERR! Exit status 1
npm ERR! Failed at the firstname.lastname@example.org install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2022-12-09T15_31_07_806Z-debug.log
Error: building at STEP "RUN npm install -g meteor": while running runtime: exit status 1
So effectively a 2.8.2 installer is asking me to upgrade to 2.5.1 or above.
What is happening here?
@hschmaiske for clarity, the “run” you are seeing is created by docker/podman build files and is only shown as part of the output logs. Effectively this executes a “plain” npm install -g meteor in the container.
I took a moment to look into the meteor source. The root cause of my issue is in line 58 of the install.js
Seems the rules for non x86 are very tight, i.e. it must be arm64 on a Mac.
Now what I am doing, is I am trying to dockerize a meteor installation based on an ARM build of the node.js docker image on a M1 Mac. This means that while architecture matches, the platform though is not Darwin but Linux. So at least the check for Darwin will fail.
For comparison, that is what I get on my M1 Mac for uname:
Darwin myMacbook 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 arm64
And here’s the uname output while inside the docker env running on that same Mac:
Linux 292116d93241 6.0.9-300.fc37.aarch64 #1 SMP PREEMPT_DYNAMIC Wed Nov 16 17:04:07 UTC 2022 aarch64 GNU/Linux
So it is pretty clear why this won’t work like it is right now. The question for me is, if the check is simply too strict because no-one so far tried to run Meteor on ARM based Linux, or if this was a conscious choice by the MDG because they found out that it won’t work for other reasons.