【问题标题】:Unable to deploy meteor 1.9 on Digital Ocean using mup无法使用 mup 在 Digital Ocean 上部署流星 1.9
【发布时间】:2020-03-04 19:14:25
【问题描述】:

我一直在尝试通过 mup 在数字海滴上部署流星 1.9 应用程序,但我做不到。 如果我使用 abernix/meteord:base 映像,则会出现尖锐安装问题。 如果我使用具有不同节点版本的其他图像,我会收到 bcrypt 安装错误。 这是我的mup文件。

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: "server IP",
      username: "root",

      password: "my password"
      // or neither for authenticate from ssh-agent
    }
  },

  app: {
    // TODO: change app name and path
    name: "appName",
    path: ".",

    servers: {
      one: {}
    },

    buildOptions: {
      serverOnly: true
    },

    env: {
      // TODO: Change to your app's url
      // If you are using ssl, it needs to start with https://
      PORT: 2010,
      ROOT_URL: "my url",
      MONGO_URL: "mongodb://mongodb/meteor",
      MONGO_OPLOG_URL: "mongodb://mongodb/local"
    },

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

    // 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: {}
    }
  }

};

如果我使用最新图像 abernix/meteord:node-12.14.0-base,这是错误日志

[192.241.152.237]> core-js@2.6.11 postinstall /bundle/bundle/programs/server/npm/node_modules/@babel/runtime-corejs2/node_modules/core-js
[192.241.152.237]> node -e "try{require('./postinstall')}catch(e){}"
[192.241.152.237]
[192.241.152.237]
[192.241.152.237]> core-js@2.6.11 postinstall /bundle/bundle/programs/server/npm/node_modules/babel-runtime/node_modules/core-js
[192.241.152.237]> node -e "try{require('./postinstall')}catch(e){}"
[192.241.152.237]
[192.241.152.237]
[192.241.152.237]> bcrypt@4.0.1 install /bundle/bundle/programs/server/npm/node_modules/bcrypt
[192.241.152.237]> node-pre-gyp install --fallback-to-build
[192.241.152.237]
[192.241.152.237]node-pre-gyp WARN Using request for node-pre-gyp https download
[192.241.152.237][bcrypt] Success: "/bundle/bundle/programs/server/npm/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
[192.241.152.237]
[192.241.152.237]> sharp@0.24.1 install /bundle/bundle/programs/server/npm/node_modules/sharp
[192.241.152.237]> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
[192.241.152.237]
[192.241.152.237]ERR! sharp 'darwin-x64' binaries cannot be used on the 'linux-x64' platform. Please remove the 'node_modules/sharp/vendor' directory and run 'npm install'.
[192.241.152.237]info sharp Attempting to build from source via node-gyp but this may fail due to the above error
[192.241.152.237]info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
[192.241.152.237]make: Entering directory '/bundle/bundle/programs/server/npm/node_modules/sharp/build'
[192.241.152.237]  TOUCH Release/obj.target/libvips-cpp.stamp
[192.241.152.237]  CXX(target) Release/obj.target/sharp/src/common.o
[192.241.152.237]  CXX(target) Release/obj.target/sharp/src/metadata.o
[192.241.152.237]  CXX(target) Release/obj.target/sharp/src/stats.o
[192.241.152.237]  CXX(target) Release/obj.target/sharp/src/operations.o
[192.241.152.237]  CXX(target) Release/obj.target/sharp/src/pipeline.o
[192.241.152.237]  CXX(target) Release/obj.target/sharp/src/sharp.o

【问题讨论】:

  • 您使用的是哪个 Mewor 版本? aberbix 镜像需要满足 Meteor 使用的节点版本,你可以在你的 Meteor 项目中使用meteor node -v
  • 使用数字海洋上的哪个Ubuntu版本?

标签: meteor digital-ocean mup


【解决方案1】:

更正:

在重新阅读该问题并仔细查看您的错误消息后,看起来安装的清晰二进制文件是为 MacOS 安装的,它正在尝试为 Linux 构建它们并且可能会失败。

如果您还没有这样做,您可以尝试销毁当前的 droplet 并重新使用 mup 来设置它,或者您可以在 VM 或单独的 droplet 中启动 Linux 并在等效系统上构建,然后从那里进行部署.

【讨论】:

  • 你使用的是什么版本的sharp和bcrypt
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-07-08
  • 2016-09-17
  • 2017-01-25
  • 1970-01-01
相关资源
最近更新 更多