[SOLVED] Meteor Up - Deploy Build Error


I’m trying to setup a GitLab Runner for my CICD pipeline. The runner is installed on a server running Ubuntu 20.04.

I have installed all of the necessary packages directly to the machine (Meteor, Node, NPM, yarn, mup, etc). Meteor and Mup are also installed in the script in the GitLab YAML file. If I can get this working directly on the Ubuntu machine, I would assume I can just copy the fixes to the GitLab YAML.

I’m not getting much output from mup deploy, so I am struggling to debug it.

Mup version (mup --version):


Meteor version:


Node version:

12.22.1 (A docker image for node:12.18.4 is used in the GitLab YAML at the moment)

Mup config

  mup:updates checking for updates +0ms
  mup:updates Packages:  [
    name: 'mup',
    path: '/usr/local/share/.config/yarn/global/node_modules/mup/package.json'
] +2ms
  mup:updates retrieving tags for mup +3ms
  mup:api Running command default.validate +0ms
  "servers": {
    "one": {
      "host": "",
      "username": "root",
      "password": "password"
  "app": {
    "name": "my-app",
    "path": "../",
    "servers": {
      "one": {}
    "buildOptions": {
      "serverOnly": true
    "env": {
      "ROOT_URL": "https://subdomain.host.com",
      "MONGO_URL": "mongodb://mongodb:27017/my-app",
      "MONGO_OPLOG_URL": "mongodb://mongodb/local",
      "VIRTUAL_HOST": "subdomain.host.com",
      "HTTPS_METHOD": "redirect",
      "LETSENCRYPT_HOST": "subdomain.host.com",
      "LETSENCRYPT_EMAIL": "email@domain.com",
      "VIRTUAL_PORT": 3000,
    "docker": {
      "image": "abernix/meteord:node-12-base",
      "stopAppDuringPrepareBundle": true,
      "imagePort": 3000,
      "args": [
    "enableUploadProgressBar": false,
    "type": "meteor"
  "mongo": {
    "version": "3.4.1",
    "servers": {
      "one": {}
    "dbName": "qrderstaging"
  "proxy": {
    "domains": "subdomain.host.com",
    "ssl": {
      "letsEncryptEmail": "email@domain.com",
      "forceSSL": true
✓ Config is valid

Output of command (DEBUG=mup* mup deploy --verbose)

  mup:updates checking for updates +0ms
  mup:updates Packages:  [
    name: 'mup',
    path: '/usr/local/share/.config/yarn/global/node_modules/mup/package.json'
] +2ms
  mup:updates retrieving tags for mup +3ms
  mup:api Running command default.deploy +0ms
  mup:module:default exec => mup deploy +0ms
  mup:api Running command meteor.deploy +7ms
  mup:module:meteor exec => mup meteor deploy +0ms
  mup:api Running command meteor.push +1ms
  mup:module:meteor exec => mup meteor push +2ms
  mup:api Running command meteor.build +1ms
Building App Bundle Locally
  mup:module:meteor Build Path: /var/local/qrder +0ms
  mup:module:meteor Build Command:  meteor build --directory /tmp/mup-meteor-dbce92be-b88d-4ec5-9ea4-5c43fc6d3c6d --architecture os.linux.x86_64 --server-only +0ms
  mup:updates finished update check for mup +303ms

Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app directory will be incorrect if you ever attempt to perform any Meteor tasks as a
normal user. If you need to fix your permissions, run the following command from the root of your project:

  sudo chown -Rh <username> .meteor/local

Browserslist: caniuse-lite is outdated. Please run:                         
npx browserslist@latest --update-db

Why you should do it regularly:
   Building for web.browser.legacy         
=> Build Error. Check the logs printed above.

“Building for web.browser.legacy” is not always the same. Sometimes it fails on other sections (Minifying app code, etc).

I’ve been struggling with this for a few days. I’m finding it hard to find the cause of this issue because there isn’t a lot of error information.

I develop the application on a MacOS system. I can deploy perfectly fine from this but I am struggling to deploy from the Ubuntu machine or from Docker (locally and on the VM).

This specific issue was being caused because the server was running out memory so the Node process for the deployment was being cancelled and hence the build was failing.

I had initially been using a 1 CPU / 1GB RAM Ubuntu 20.04 server on Linode ($5). I increased this to 1 CPU / 2GB RAM ($10) but still had the same error.

Increasing it again to 2 CPU / 4GB RAM ($20) resolved the issue and the deployment succeeded. However, the job still took 45 minutes to run. The second and third runs took ~20 minutes on the same server.

Having to use a $20 server for a CICD deployment seems a bit excessive so I will try to improve it and bring this down to the $10 server.

This specific issue is solved but I would still appreciate any suggestions for performance improvements.

Given the long deployment times something seems off. Deploying manually, for an average size app, mup should be done in 5 minutes and work on even 0.5GB RAM. Though this is just my own experience with a specific app. Perhaps create a new empty hello world app and see if that works out fine with your current setup.

1 Like

Yeah, I also thought it should work on lower specs.

Thanks for the suggestion. I will try that.