首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Meteor-Up部署meteorJS 1.2失败

使用Meteor-Up部署meteorJS 1.2失败
EN

Stack Overflow用户
提问于 2017-11-06 17:53:58
回答 1查看 110关注 0票数 1

这个应用程序是Meteor-1.2.2。希望Meteor-up和它兼容。我一直在尝试使用Mup - Meteor Up部署到生产服务器上,但总是失败。我已经用了大约3天了。seup确实成功通过,但在编译阶段部署失败。我做什么好?

代码语言:javascript
复制
module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: 'xxx.xxx.xxx.xxx',
      username: 'serveradmin',
      // pem: './path/to/pem'
       password: 'serverpassword'
      // or neither for authenticate from ssh-agent
    }
  },

  "buildOptions": {
    // build with the debug mode on
    // You can deploy in debug mode by passing --debug.
    // This will leave your source code readable by your favorite in-browser debugger, just like it is in local development mode
    // :: Think Meteor Toys!
    "debug": true,

    // executable used to build the meteor project
    // you can set a local repo path if needed
    "executable": "meteor"
  },

  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": false,

  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": true,

  // WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
  "nodeVersion": "0.10.40", 

  // Install PhantomJS in the server
  "setupPhantom": false,


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

    servers: {
      one: {},
    },

    env: {
      // TODO: Change to your app's url
      // If you are using ssl, it needs to start with https://
      port: 3300,
      ROOT_URL: 'https://course.rabboni.com',
      MONGO_URL: 'mongodb://ken4ward:newpass123@ds243085.mlab.com:43085/rabbonidbserver',
    },

     ssl: { // (optional)
    //   // Enables let's encrypt (optional)
       autogenerate: {
         email: 'kehindeadeoya@gmail.com',
    //     // comma separated list of domains
         domains: 'course.rabboni.com,www.course.rabboni.com'
       }
     },

    docker: {
      // change to 'kadirahq/meteord' if your app is using Meteor 1.3 or older
      image: 'kadirahq/meteord:base',
    },

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

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

错误日志

代码语言:javascript
复制
C:\Programs\contract\crowducate-platform\.deploy>mup.cmd deploy

   ┌─────────────────────────────────────┐
   │                                     │
   │   update available 1.3.4 => 1.3.5   │
   │     To update, run npm i -g mup     │
   │                                     │
   └─────────────────────────────────────┘

loaded config from C:\Programs\contract\crowducate-platform\.deploy\mup.js

5 Validation Errors
  - "buildOptions" is an unknown property
  - "setupMongo" is an unknown property
  - "setupNode" is an unknown property
  - "nodeVersion" is an unknown property
  - "setupPhantom" is an unknown property

Read the docs and view example configs at
    http://meteor-up.com/docs

Building App Bundle Locally
Errors prevented bundling:
While minifying app code:

C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:196:18:
Unexpected token: punc (:)
at new JS_Parse_Error
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:196:18)
at js_error
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:204:11)
at croak
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:675:9)
at token_error
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:683:9)
at unexpected
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:689:9)
at semicolon
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:709:43)
at simple_statement
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:889:73)
at
C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:742:47
at
C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:722:24
at block_
(C:\Users\ken4ward\AppData\Local\.meteor\packages\standard-minifiers\1.0.2\plugin.minifyStd.os\npm\minifiers\node_modules\uglify-js\lib\parse.js:1002:20)



=> Build Error. Check the logs printed above.

C:\Programs\contract\crowducate-platform\.deploy>

C:\Programs\contract\crowducate-platform\.deploy>
EN

回答 1

Stack Overflow用户

发布于 2017-11-07 07:24:10

这是一个很好的例子,说明了您需要阅读错误并遵循建议。例如:

代码语言:javascript
复制
5 Validation Errors
  - "buildOptions" is an unknown property
  - "setupMongo" is an unknown property
  - "setupNode" is an unknown property
  - "nodeVersion" is an unknown property
  - "setupPhantom" is an unknown property

其中唯一有效的是buildOptions,它需要位于meteor块中,如下所示:

代码语言:javascript
复制
meteor: {
  buildOptions: {
    // build with the debug mode on
    debug: true,
    // mobile setting for cordova apps
    mobileSettings: {
      public: {
        'meteor-up': 'rocks',
      }
    },
    // executable used to build the meteor project
    // you can set a local repo path if needed
    executable: 'meteor',
  }
}

我不知道你从哪弄来的。解析器对您很友好,让您知道无效的选项。

接下来,它建议您阅读文档

http://meteor-up.com/docs上阅读文档并查看示例配置

因此,我最好的建议是阅读说明。其中一个命令(我不会告诉您是哪个)甚至会生成一个示例文件,您可以对其进行编辑。如果您只需按照说明操作,那么MUP就非常容易使用。玩得开心。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47134094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档