Skip to content
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

Meteor 2.13 support #32

Closed
erixtekila opened this issue Aug 8, 2023 · 17 comments · Fixed by #34
Closed

Meteor 2.13 support #32

erixtekila opened this issue Aug 8, 2023 · 17 comments · Fixed by #34

Comments

@erixtekila
Copy link

Hi,
The meteor core decided to make a strange move that breaks MUP.
They have forked nodejs v14.21.3 to create their own version (containing upstream fixes).
More informations

Anyhow, this version doesn't exists for nvm, beaking all futher MUP deployments !

An alternative is available , but breaks some configurations in root hosting.

Any way to get a workaround ?

@timsun28
Copy link

timsun28 commented Aug 8, 2023

I got the same error after updating to version 2.13. After switching back to version 2.12 in the .meteor/release file it deployed without any issues again.

I got the following error logs:

x Prepare Bundle: FAILED

              ------------------------------------STDERR------------------------------------
              
              ------------------------------------STDOUT------------------------------------
              Updating base image
        Using default tag: latest
        latest: Pulling from zodern/meteor
        Digest: sha256:38852ea96f0e430fda9dcb95eff30ef6a903c71310e67eef32c63064756f3ae3
        Status: Image is up to date for zodern/meteor:latest
        docker.io/zodern/meteor:latest
        Preparing for docker build
        Creating Dockerfile
        Finished creating Dockerfile
        Building image
        #0 building with "default" instance using docker driver

        #1 [internal] load .dockerignore
        #1 transferring context: 2B done
        #1 DONE 0.0s

        #2 [internal] load build definition from Dockerfile
        #2 transferring dockerfile: 735B done
        #2 DONE 0.0s

        #3 resolve image config for docker.io/docker/dockerfile:1-experimental
        #3 DONE 0.9s

        #4 docker-image://docker.io/docker/dockerfile:1-experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5
        #4 CACHED

        #5 [internal] load build definition from Dockerfile
        #5 DONE 0.0s

        #6 [internal] load .dockerignore
        #6 DONE 0.0s

        #7 [internal] load metadata for docker.io/zodern/meteor:latest
        #7 DONE 0.0s

        #8 [1/4] FROM docker.io/zodern/meteor
        #8 CACHED

        #9 [internal] load build context
        #9 transferring context: 104.42MB 3.3s done
        #9 DONE 3.3s

        #10 [2/4] RUN bash ./scripts/onbuild-node.sh
        #10 3.512 NODE_VERSION=14.21.4
        #10 ERROR: process "/bin/sh -c bash ./scripts/onbuild-node.sh" did not complete successfully: exit code: 3
        ------
         > [2/4] RUN bash ./scripts/onbuild-node.sh:
        3.512 NODE_VERSION=14.21.4
        ------
        Dockerfile:1
        --------------------
           1 | >>> # syntax=docker/dockerfile:1-experimental
           2 |     FROM zodern/meteor
           3 |     RUN mkdir /built_app || true
        --------------------
        ERROR: failed to solve: process "/bin/sh -c bash ./scripts/onbuild-node.sh" did not complete successfully: exit code: 3

        real    0m6.873s
        user    0m0.676s
        sys     0m0.422s

              ------------------------------------------------------------------------------

@erixtekila
Copy link
Author

erixtekila commented Aug 8, 2023

Good point @timsun28 !
Keeping on meteor version 2.12 works as usual.

The issue lies in > [2/4] RUN bash ./scripts/onbuild-node.sh: 3.512 NODE_VERSION=14.21.4 which doesn't exist in node's release.

It was hard to get around this one !

@matt-dale
Copy link

Just pointing out the Node version issue in this post:
https://blog.meteor.com/new-meteor-js-2-13-node-js-14-21-4-security-patch-and-blaze-2-7-1-release-60134947e4c

I believe this needs to use meteor/node for the node version since they patched some security holes.

@erixtekila
Copy link
Author

@matt-dale, internally MUP uses nvm to set the node version.
Since this version is a fork from meteor's team, it won't exist for nvm
Then using this forked version needs a big change…

@timsun28
Copy link

Once Meteor 3.0 is released, Mup can keep using nvm to get node 18, but until then we would be stuck on Meteor 2.12.
I'm not actively following meteor 3.0 release schedule, but I believe they are going to release the first beta soon. It would depend on how long it will take for the full version to get released if it's worth changing the way mup functions just so we can deploy with version 2.13 and the node version with bug fixes from the meteor team.

The meteor team has released a docker image for their version of node: https://hub.docker.com/r/meteor/node
Someone with a bit more knowledge on the workings of mup could help decide if this could be used instead of nvm.

@zodern
Copy link
Owner

zodern commented Aug 14, 2023

We would need to update

nvm install $NODE_VERSION
to check if it is Node 14 and the minor is larger than 14.20, and download the build from Meteor. We might be able to install it in a way that nvm use works on it. Would either of you be willing to create a PR? If not, I might have time later this week.

@timsun28
Copy link

nvm offers an option to choose a different mirror for node binaries which could be helpful in order to download from a different source that does offer the required version.

It is unfortunate that meteor doesn't supply these binaries themselves, so we would need to generate them with each deploy or host them somewhere so mup can download them.

I would be willing to help, but I'm not quite sure where to start. Which of these solutions do you think would work best or would it still be worth looking into using the docker version of node that is supplied by the meteor team?

@erixtekila
Copy link
Author

@zodern
Copy link
Owner

zodern commented Aug 14, 2023

nvm offers an option to choose a different mirror for node binaries which could be helpful in order to download from a different source that does offer the required version.

We could try that - using the official mirror for other versions, and another one for version 14.20. Or maybe we could create a simple web server to use as the mirror that proxies requests to the correct mirror.

It is unfortunate that meteor doesn't supply these binaries themselves, so we would need to generate them with each deploy or host them somewhere so mup can download them.

It wasn't documented, but they do provide some binaries - meteor/meteor#12631. Wekan also provides binaries, for a wider range of platforms/arch's than Meteor does: https://github.com/wekan/node-v14-esm/releases/tag/v14.21.4

@Rimpyyadav
Copy link

Hey, May i know that this issue get resolved or not?

@ferjep
Copy link

ferjep commented Oct 10, 2023

Any updates on this?

@graphikjunkie
Copy link

Still unable to deploy meteor 2.1.13 using MUP. Was there ever a fix?

@erixtekila
Copy link
Author

Today only working solution is to downgrade meteor version.

@graphikjunkie
Copy link

@zodern been using your docker images for years, many thanks! But is this project now abandoned?

@nicooler
Copy link

A possible solution while we are all waiting for @zodern ;-)

#34 (comment)

@zodern
Copy link
Owner

zodern commented Nov 21, 2023

Sorry for not fixing this sooner. I started work on it last weekend. The main issue remaining is one group of tests are failing locally with #34 (probably due to my computer instead of the PR).

@aboire
Copy link

aboire commented Dec 14, 2023

Does anyone find a solution or a working image in root with buildInstructions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants