zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.28k stars 279 forks source link

mup not working with meteor installed via npm (only via legacy script method) #1273

Open OliverColeman opened 2 years ago

OliverColeman commented 2 years ago

mup deploy is not working when I install meteor via the (now recommended) method via npm (npm install -g meteor), but it works fine when I install meteor via the (now legacy) install script method (curl https://install.meteor.com/ | sh)

Mup version (mup --version): 1.5.5

Mup config

{
  "servers": {
    "one": {
      "host": "1.2.3.4",
      "username": "oliver",
      "pem": "~/.ssh/pem"
    }
  },
  "app": {
    "name": "my-app",
    "path": "/home/data/work/airsight/workspace/code/axldm",
    "servers": {
      "one": {}
    },
    "buildOptions": {
      "serverOnly": true,
      "buildLocation": "/tmp/mup-meteor-8c46ed5b-71b0-430e-8c42-3c5d80d7ece2",
      "cleanBuildLocation": true
    },
    "env": {
      "ROOT_URL": "https://subdomain.subdomain.host.com",
      "MONGO_URL": "mongodb://user:pass@subdomain.subdomain.host.com:27017/axldm",
      "NODE_OPTIONS": "--max-old-space-size=3000",
      "AZURE_AXML_BLOB_KEY": "redacted",
      "VIRTUAL_HOST": "subdomain.subdomain.host.com",
      "HTTPS_METHOD": "redirect",
      "LETSENCRYPT_HOST": "subdomain.subdomain.host.com",
      "LETSENCRYPT_EMAIL": "email@domain.com",
      "VIRTUAL_PORT": 3000,
      "HTTP_FORWARDED_COUNT": 1
    },
    "docker": {
      "image": "abernix/meteord:node-12-base",
      "args": [
        "--ulimit nofile=90000:90000"
      ],
      "buildInstructions": [
        "RUN echo \"deb http://archive.debian.org/debian jessie-backports main\" >> /etc/apt/sources.list             && apt-get update -o Acquire::Check-Valid-Until=false             && apt-get -y install ffmpeg graphicsmagick"
      ],
      "stopAppDuringPrepareBundle": true,
      "imagePort": 3000
    },
    "volumes": {
      "/workspace": "/workspace"
    },
    "enableUploadProgressBar": true,
    "type": "meteor"
  },
  "proxy": {
    "domains": "subdomain.subdomain.host.com",
    "ssl": {
      "letsEncryptEmail": "email@domain.com",
      "forceSSL": true
    }
  },
  "hooks": {
    "pre.deploy": {}
  }
}

Output of command

➜  .deploy git:(main) ✗ mup deploy --verbose
Cleaning Up Previous Builds
Building App Bundle Locally
{ cwd: '/home/data/work/airsight/workspace/code/axldm',
  env:
   { COLORFGBG: '0;15',
     COLORTERM: 'truecolor',
     DBUS_SESSION_BUS_ADDRESS: 'unix:path=/run/user/1000/bus',
     DESKTOP_SESSION: 'plasma',
     DISPLAY: ':0',
     GPG_AGENT_INFO: '/run/user/1000/gnupg/S.gpg-agent:0:1',
     GTK2_RC_FILES:
      '/etc/gtk-2.0/gtkrc:/home/oliver/.gtkrc-2.0:/home/oliver/.config/gtkrc-2.0',
     GTK_RC_FILES:
      '/etc/gtk/gtkrc:/home/oliver/.gtkrc:/home/oliver/.config/gtkrc',
     HOME: '/home/oliver',
     KDE_FULL_SESSION: 'true',
     KDE_SESSION_UID: '1000',
     KDE_SESSION_VERSION: '5',
     KONSOLE_DBUS_SERVICE: ':1.32',
     KONSOLE_DBUS_SESSION: '/Sessions/1',
     KONSOLE_VERSION: '191203',
     LANG: 'en_AU.UTF-8',
     LANGUAGE: 'en_AU:en',
     LOGNAME: 'oliver',
     OLDPWD: '/home/data/work/airsight/workspace/code/axldm',
     PAM_KWALLET5_LOGIN: '/run/user/1000/kwallet5.socket',
     PATH:
      '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin',
     PROFILEHOME: '',
     PWD: '/home/data/work/airsight/workspace/code/axldm/.deploy',
     QT_ACCESSIBILITY: '1',
     QT_AUTO_SCREEN_SCALE_FACTOR: '0',
     SESSION_MANAGER:
      'local/hubert:@/tmp/.ICE-unix/2007,unix/hubert:/tmp/.ICE-unix/2007',
     SHELL: '/usr/bin/zsh',
     SHELL_SESSION_ID: '339b840252a44dca80beedcb4fdd86c2',
     SHLVL: '1',
     SSH_AGENT_PID: '1929',
     SSH_AUTH_SOCK: '/tmp/ssh-DUeQpX1rqNIP/agent.1888',
     TERM: 'xterm-256color',
     USER: 'oliver',
     WINDOWID: '44040199',
     XAUTHORITY: '/tmp/xauth-1000-_0',
     XCURSOR_SIZE: '24',
     XCURSOR_THEME: 'breeze_cursors',
     XDG_CONFIG_DIRS:
      '/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings',
     XDG_CURRENT_DESKTOP: 'KDE',
     XDG_DATA_DIRS: '/usr/share/plasma:/usr/local/share/:/usr/share/',
     XDG_RUNTIME_DIR: '/run/user/1000',
     XDG_SEAT: 'seat0',
     XDG_SEAT_PATH: '/org/freedesktop/DisplayManager/Seat0',
     XDG_SESSION_CLASS: 'user',
     XDG_SESSION_DESKTOP: 'KDE',
     XDG_SESSION_ID: '3',
     XDG_SESSION_PATH: '/org/freedesktop/DisplayManager/Session1',
     XDG_SESSION_TYPE: 'x11',
     XDG_VTNR: '1',
     _: '/usr/local/bin/mup',
     ZSH: '/home/oliver/.oh-my-zsh',
     PAGER: 'less',
     LESS: '-R',
     LSCOLORS: 'Gxfxcxdxbxegedabagacad',
     LS_COLORS:
      'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
     METEOR_HEADLESS: 1 },
  stdio:
   [ ReadStream {
       connecting: false,
       _hadError: false,
       _handle: [TTY],
       _parent: null,
       _host: null,
       _readableState: [ReadableState],
       readable: true,
       _events: [Object],
       _eventsCount: 2,
       _maxListeners: undefined,
       _writableState: [WritableState],
       writable: false,
       allowHalfOpen: false,
       _sockname: null,
       _pendingData: null,
       _pendingEncoding: '',
       server: null,
       _server: null,
       isRaw: false,
       isTTY: true,
       fd: 0,
       [Symbol(asyncId)]: 16,
       [Symbol(lastWriteQueueSize)]: 0,
       [Symbol(timeout)]: null,
       [Symbol(kBytesRead)]: 0,
       [Symbol(kBytesWritten)]: 0 },
     WriteStream {
       connecting: false,
       _hadError: false,
       _handle: [TTY],
       _parent: null,
       _host: null,
       _readableState: [ReadableState],
       readable: false,
       _events: [Object],
       _eventsCount: 2,
       _maxListeners: undefined,
       _writableState: [WritableState],
       writable: true,
       allowHalfOpen: false,
       _sockname: null,
       _pendingData: null,
       _pendingEncoding: '',
       server: null,
       _server: null,
       columns: 210,
       rows: 51,
       _type: 'tty',
       fd: 1,
       _isStdio: true,
       destroySoon: [Function: destroy],
       _destroy: [Function: dummyDestroy],
       [Symbol(asyncId)]: 2,
       [Symbol(lastWriteQueueSize)]: 0,
       [Symbol(timeout)]: null,
       [Symbol(kBytesRead)]: 0,
       [Symbol(kBytesWritten)]: 0 },
     WriteStream {
       connecting: false,
       _hadError: false,
       _handle: [TTY],
       _parent: null,
       _host: null,
       _readableState: [ReadableState],
       readable: false,
       _events: [Object],
       _eventsCount: 1,
       _maxListeners: undefined,
       _writableState: [WritableState],
       writable: true,
       allowHalfOpen: false,
       _sockname: null,
       _pendingData: null,
       _pendingEncoding: '',
       server: null,
       _server: null,
       columns: 210,
       rows: 51,
       _type: 'tty',
       fd: 2,
       _isStdio: true,
       destroySoon: [Function: destroy],
       _destroy: [Function: dummyDestroy],
       [Symbol(asyncId)]: 4,
       [Symbol(lastWriteQueueSize)]: 0,
       [Symbol(timeout)]: null,
       [Symbol(kBytesRead)]: 0,
       [Symbol(kBytesWritten)]: 0 } ] }
{ Error: spawn meteor ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn meteor',
  path: 'meteor',
  spawnargs:
   [ 'build',
     '--directory',
     '/tmp/mup-meteor-8c46ed5b-71b0-430e-8c42-3c5d80d7ece2',
     '--architecture',
     'os.linux.x86_64',
     '--server-only' ] }
This error usually happens when meteor is not installed.

=> Build Error. Check the logs printed above.
arggh commented 2 years ago

Try updating your docker image to zodern/meteor. If you're running Meteor version installed via npm, node 12 is probably not a good fit.