0

我一直在尝试通过 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
4

1 回答 1

1

更正:

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

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

于 2020-03-05T04:25:50.753 回答