Why is the Galaxy Node.js version outdated?

(Meteor 3.1.2)

When I run meteor npm --version in my project, I see 10.9.2. That’s fairly old, but ok, things are working locally.

When I try to deploy to galaxy, meteor npm --version shows 6.14.18. Even older!

I put meteor npm --version in my galaxy build command.

Why is the version older on Galaxy? Shouldn’t it be the same version locally and in deployment?


This is causing me some errors on the Galaxy side. The following command that I’m using for the build command works locally, but not on Galaxy, due to the discrepancy.

meteor npm --version && meteor npm install && meteor npm run build && meteor npm clean-install --omit=dev

Ideally I can just use clean-install all around, but that has never worked thus far on Galaxy. Now that I know there’s a version difference, I’m believing that was probably why.

Just a clarification: meteor npm --version being 10.9.2 isn’t too old. It matches what you’d expect with Meteor 3 and Node 22.x.x. Also, Node and NPM version numbers don’t correspond, so don’t treat them as equivalent.

That said, seeing meteor npm --version as 6.14.18 is definitely NPM version old, and it likely corresponds to an older Node version too. It also doesn’t seem to respect your app’s expected toolchain for some unknown reason. I’ve reported this to the Galaxy platform team.

Could you try exporting a new PATH as part of your build command?

export PATH=/home/mt/.meteor/packages/meteor-tool/3.1.2/mt-os.linux.x86_64/dev_bundle/bin:$PATH

Does this help on seeing a different Node and NPM version?


Update: Updating the PATH likely won’t work. You’re already using meteor npm install/meteor node --version, which prefixes commands to use Meteor’s bundled Node and NPM. The issue is probably elsewhere.

PATH fix should just work if you do npm install or node --version. Considering /home/mt/.meteor/packages/.. is an existing PATH (I think could be in Galaxy, I used this before on Galaxy Push To Deploy image), you could find proper if doesn’t exist.

1 Like

Oh oops, yeah true. I was thinking node --version. It’s lwaaaaay past my bedtime right now. Cramming for an event.

Trying again on 3.4-rc.3, Galaxy still says 6.14.18, and ends with an error like

npm ERR! Cannot read property '@babel/runtime' of undefined

When I try to run npm --version in build command (without meteor) that also shows 6.14.18.

How exactly may we work around it?

EDIT: I tried adding npm i -g node in the build command, and it fails showing the already-existing node:

echo $PATH in build command shows:

/usr/local/v14.21.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Hi,

Could you set these configurations in your push to deploy and try a new deployment?

Pre Script: (meteor update --npm 2>/dev/null || true) && meteor npm install

ENV PATH /home/mt/.meteor/packages/meteor-tool/$(meteor --version | sed -e 's/^Meteor //' -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\)-/\1.0-/' -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\)$/\1.0/')/mt-os.linux.x86_64/dev_bundle/bin:$PATH

If you need faster assistance, our support chat is available directly inside Galaxy. Just message us there and we’ll continue helping you.

Thanks, tried that, but no luck:

Can we configure the container to use a newer image?

For the Push To deploy image, no. For the Galaxy images where your app runs, yes it’s possible!

We’ve already brought this issue to our development team, and they will be making an improvement to the entire push-to-deploy system, which will eliminate these errors