2017-03-14 149 views
1

我一直使用mup deploy命令在流星應用部署上發生這個錯誤。 mup setup命令正常工作。當mup部署開始時,它會執行許多命令並進入一個命令,它說 '縮小應用程序代碼'。它停留在那裏5-6分鐘,然後發生此錯誤。流星mup部署錯誤

什麼能導致這個錯誤以及如何解決這個問題?

mup deploy --verbose 

Building App Bundle Locally 
    Minifying app code 
=> Build Error. Check the logs printed above. 
Error: build-error 
    at ChildProcess.<anonymous> (/usr/lib/node_modules/mup/lib/modules/meteor/build.js:46:16) 
    at emitTwo (events.js:106:13) 
    at ChildProcess.emit (events.js:194:7) 
    at maybeClose (internal/child_process.js:899:16) 
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 

這是我的mup.js文件。 其他統計 節點v7.7.2 NPM V4.1.2

module.exports = { 
    servers: { 
    one: { 
     // TODO: set host address, username, and authentication method 
     host: '54.218.35.182', 
     username: 'ubuntu', 
     pem: '~/.ssh/iAssureIT-Ubuntu2.pem' 
     // password: 'server-password' 
     // or neither for authenticate from ssh-agent 
    } 
    }, 

    meteor: { 
    // TODO: change app name and path 
    name: 'musissive', 
    path: '/var/www/meteor/musissive', 

    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://musifyindia.com', 
     MONGO_URL: 'mongodb://localhost/meteor', 
     PORT: 3003, 
    }, 

    docker: { 
     // change to 'kadirahq/meteord' if your app is not using Meteor 1.4 
     image: 'abernix/meteord:base', 
    }, 

    // This is the maximum time in seconds it will wait 
    // for your app to start 
    // Add 30 seconds if the server has 512mb of ram 
    // And 30 more if you have binary npm dependencies. 
    deployCheckWaitTime: 2400, 

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

    mongo: { 
    port: 27017, 
    version: '3.4.1', 
    servers: { 
     one: {} 
    } 
    } 
}; 
+0

請嘗試部署什麼版本的流星?你的aws服務器上也安裝了mongodb嗎? – collision

回答

0

流星構建發生錯誤無關與MUP.js.問題在於服務器上的RAM很低。我正在嘗試使用可用的最大1 GB的免費EC2實例進行構建。這對Meteor Build來說是不夠的。當我升級到4 GB的實例時,它開始工作得很好。