user8891334
user8891334

Reputation: 171

Meteor-Up (mup) error after "mup init"

I am trying to use mup to deploy a meteor app to my DigitalOcean droplet.

What I have done so far

Here is where I ran into an error. Upon running "mup setup", I am hit with the following error. [1]

What I tried: I suspected that there could have been an issue with my syntax when configuring the mup.js file. After double-checking and not finding any error, I decided to re-install mup, and try running "mup setup" without modifying the "mup.js" file. However, I still receive the same error message.

Furthermore, after running "mup init", I can no longer run "mup" either, as I receive the same error as seen above. I suspect therefore that the issue is with the mup.js file. I have attached the generic version provided by meteor-up below (which still causes the error seen above).

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '1.2.3.4',
      username: 'root',
      // pem: './path/to/pem'
      // password: 'server-password'
      // or neither for authenticate from ssh-agent
    }
  },

  app: {
    // TODO: change app name and path
    name: 'app',
    path: '../app',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      // TODO: Change to your app's url
      // If you are using ssl, it needs to start with https://
      ROOT_URL: 'http://app.com',
      MONGO_URL: 'mongodb://localhost/meteor',
    },

    // ssl: { // (optional)
    //   // Enables let's encrypt (optional)
    //   autogenerate: {
    //     email: '[email protected]',
    //     // comma separated list of domains
    //     domains: 'website.com,www.website.com'
    //   }
    // },

    docker: {
      // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
      image: 'abernix/meteord:node-8.4.0-base',
    },

    // Show progress bar while uploading bundle to server
    // You might need to disable it on CI servers
    enableUploadProgressBar: true
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  }
};

Any help would be greatly appreciated!

Thank you

Upvotes: 0

Views: 290

Answers (2)

Peter Olson
Peter Olson

Reputation: 143027

I faced this same issue today. The problem is that Windows is trying to execute the mup.js file as a JScript script.

Here is the solution from the Meteor Up Common Problems page:

Mup silently fails, mup.js file opens instead, or you get a Windows script error

If you are using Windows, make sure you run commands with mup.cmd instead of mup , or use PowerShell.

That is, instead of mup setup, run mup.cmd setup.

Upvotes: 0

coagmano
coagmano

Reputation: 5671

The error dialog you posted shows a syntax error at line 10, character 5.

If you take a look:

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '1.2.3.4',
      username: 'root',
      // pem: './path/to/pem'
      // password: 'server-password'
      // or neither for authenticate from ssh-agent
    }
   ^^^ This character
  },

It's a closing brace which JS was not expecting. So why was it unexpected, lets move back to the last valid syntax:

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '1.2.3.4',
      username: 'root',
                      ^^^ This character
      // pem: './path/to/pem'
      // password: 'server-password'
      // or neither for authenticate from ssh-agent
    }

  },

Well, looks like a comma which isn't followed by another key-value pair. Also known as a syntax error.

Take the comma out and things should be fine again!

Upvotes: 0

Related Questions