Npm install 2.8.2 fails on ARM64, asks to upgrade to 2.5.1 or later

Hi,

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

> **meteor@2.8.2** 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! meteor@2.8.2 install: `node cli.js install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meteor@2.8.2 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?

Seems to be incorrect, it’s just npm install -g meteor

@grubba can you double check it?

@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.

1 Like
1 Like

Thanks for the pointer @rjdavid
I will keep watching that GH issue then.

Hello,

We are still working internally on ARM support.

There are many tests and scenarios that we are testing.

I believe that in the first half of 2023, we will already have an initial version in ARM.

Soon we will give more information about the progress of this task.

Best Regards,

Philippe Oliveira

Thanks @philippeoliveira. Any updates? We are interested in ARM for Linux support for two reasons:

  • Building images in Docker on MacOS M machines (which in Docker run ARM Linux).
  • Running Meteor in production containers with ARM Linux (e.g. AWS Graviton).
1 Like

Hello @evolross , how are you?

We are working on this ARM task and I talked last week with @grubba and we will probably release in Meteor 2.14 version.

We already have an internal Meteor version running on Graviton from AWS, it’s working very well.

But we are doing the final tests. I’ll let you know as soon as I have more information.

Best Regards,

Philippe Oliveira

2 Likes

This is still an issue when trying to build a docker image with RUN npm install -g meteor on a Mac M1 …

Linux arm64:

npx meteor@beta

meteor create --release 3.0.1

Can you try what @xet7 said, but with the official?

npx meteor
meteor create --release 3.0.1

@denyhs

m1air:~$ uname -a
Linux m1air 6.8.0-1011-asahi-arm #11-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 25 18:1x
m1air:~$ npx meteor
=> Arch: os.linux.aarch64
=> Meteor Release: 3.0.1
Downloading |β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘| 0%node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: Response status was 403
    at ClientRequest.<anonymous> (/home/wekan/.npm/_npx/a161db0e9e033064/node_m)
    at Object.onceWrapper (node:events:634:26)
    at ClientRequest.emit (node:events:519:28)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:698)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
    at TLSSocket.socketOnData (node:_http_client:540:22)
    at TLSSocket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
Emitted 'error' event on b instance at:
    at ClientRequest.<anonymous> (/home/wekan/.npm/_npx/a161db0e9e033064/node_m)
    at Object.onceWrapper (node:events:634:26)
    [... lines matching original stack trace ...]
    at Readable.push (node:internal/streams/readable:390:5) {
  status: 403,
  body: ''
}

Node.js v20.15.1

@denyhs

m1air:~$ uname -a
Linux m1air 6.8.0-1011-asahi-arm #11-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 25 18:1x
m1air:~$ npx meteor@beta
=> Arch: os.linux.aarch64
=> Meteor Release: 3.0-beta.7
=> Meteor Downloaded in 19.536s
=> Extracting the tarball, this may take some time
=> Meteor extracted in 7.567s                                                   

***************************************

Meteor has been installed!

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

  docs.meteor.com

Deploy and host your app with Cloud:

  www.meteor.com/cloud

***************************************
You might need to open a new terminal window to have access to the meteor command, or run this in your terminal:

export PATH=/home/user/.meteor:$PATH

For adding it immediately to your path.
***************************************
  
m1air:~$ meteor create --release 3.0.1
? What is the name/path of your app?  (my-app)

Thanks @xet7!

I’ll get @nachocodoner’s help here. He has the setup for testing these, so figuring out what’s happening may be faster.

Can you try now?

I think it worked for me because of a local permissions configuration. I adjusted it to make the meteor archive for that version public as expected.

@nachocodoner

Thanks! Now it works!

m1air:~$ npx meteor
=> Arch: os.linux.aarch64
=> Meteor Release: 3.0.1
=> Meteor Downloaded in 11.153s
=> Extracting the tarball, this may take some time
=> Meteor extracted in 7.641s                                                                                       

***************************************

Meteor has been installed!

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

  docs.meteor.com

Deploy and host your app with Cloud:

  www.meteor.com/cloud

***************************************
You might need to open a new terminal window to have access to the meteor command, or run this in your terminal:

export PATH=/home/user/.meteor:$PATH

For adding it immediately to your path.
***************************************

m1air:~$ meteor create
? What is the name/path of your app?
1 Like