虽然它昨天还在工作,但现在通过 Mup 将 Meteor 应用程序部署到 Digital Ocean 时出现错误。
我收到以下错误:
The command '/bin/sh -c cd /built_app/programs/server && npm install --unsafe-perm' returned a non-zero code: 1
我的mup文件是:
module.exports = {
servers: {
one: {
host: '134.209.106.xx',
username: 'XXX',
password: 'XXX',
}
},
app: {
// TODO: change app name and path
name: 'masters-of-the-modern-age',
path: '../',
volumes: {
'/uploads': '/uploads'
},
servers: {
one: {},
},
buildOptions: {
serverOnly: true
},
env: {
ROOT_URL: 'https://app.skill.social'
},
docker: {
image: 'abernix/meteord:node-12.16.1-base'
},
enableUploadProgressBar: true,
deployCheckWaitTime: 100
},
proxy: {
domains: 'app.skill.social',
ssl: {
letsEncryptEmail: 'hello@soma.academy',
forceSSL: true
}
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
},
};
mup deploy --verbose 输出为:
Building App Bundle Locally
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Started TaskList: Pushing Meteor App
[134.209.106.56] - Pushing Meteor App Bundle to the Server
[134.209.106.56] - Pushing Meteor App Bundle to the Server: SUCCESS
[134.209.106.56] - Prepare Bundle
node-12.16.1-base: Pulling from abernix/meteord
3192219afd04: Pulling fs layer
467dbb3d2aa9: Pulling fs layer
839371370b5e: Pulling fs layer
20de0707b26d: Pulling fs layer
6a8f7e3253aa: Pulling fs layer
37f7a255f4d5: Pulling fs layer
88a22e4d1eaf: Pulling fs layer
20de0707b26d: Waiting
6a8f7e3253aa: Waiting
37f7a255f4d5: Waiting
88a22e4d1eaf: Waiting
467dbb3d2aa9: Download complete
3192219afd04: Verifying Checksum
3192219afd04: Download complete
839371370b5e: Verifying Checksum
839371370b5e: Download complete
20de0707b26d: Verifying Checksum
20de0707b26d: Download complete
6a8f7e3253aa: Verifying Checksum
6a8f7e3253aa: Download complete
37f7a255f4d5: Verifying Checksum
37f7a255f4d5: Download complete
88a22e4d1eaf: Verifying Checksum
3192219afd04: Pull complete
467dbb3d2aa9: Pull complete
839371370b5e: Pull complete
20de0707b26d: Pull complete
6a8f7e3253aa: Pull complete
37f7a255f4d5: Pull complete
88a22e4d1eaf: Pull complete
Digest: sha256:ce0b262902c9430230fd840fbef52690edcfdb3ba2c96015f83d310715c899f1
Status: Downloaded newer image for abernix/meteord:node-12.16.1-base
Finished Extracting
Creating Dockerfile
Finished creating Dockerfile
Building image
Sending build context to Docker daemon 347.1MB
Step 1/11 : FROM abernix/meteord:node-12.16.1-base
# Executing 1 build trigger
---> Running in 1598a5d00821
Removing intermediate container 1598a5d00821
---> 8621459a27f1
Step 2/11 : RUN mkdir /built_app || true
---> Running in 44753855e876
Removing intermediate container 44753855e876
---> 2a7026ff45c3
Step 3/11 : ENV ROOT_URL=https://app.skill.social
---> Running in 5adb91b3a44f
Removing intermediate container 5adb91b3a44f
---> 17cc71a78273
Step 4/11 : ENV MONGO_URL=mongodb://mongodb:27017/masters-of-the-modern-age
---> Running in e53bf91f7a57
Removing intermediate container e53bf91f7a57
---> cc2b884c45c7
Step 5/11 : ENV VIRTUAL_HOST=app.skill.social
---> Running in dd15986c49e9
Removing intermediate container dd15986c49e9
---> 7628af2ed3f8
Step 6/11 : ENV HTTPS_METHOD=redirect
---> Running in e29c63760b35
Removing intermediate container e29c63760b35
---> d5ef4136d224
Step 7/11 : ENV HTTP_FORWARDED_COUNT=1
---> Running in 57888fe104cf
Removing intermediate container 57888fe104cf
---> eefa3fbfcdcf
Step 8/11 : ENV LETSENCRYPT_HOST=app.skill.social
---> Running in ee5c48488873
Removing intermediate container ee5c48488873
---> 50d677194fc4
Step 9/11 : ENV LETSENCRYPT_EMAIL=hello@soma.academy
---> Running in 68f4325aee44
Removing intermediate container 68f4325aee44
---> e976998df6e3
Step 10/11 : COPY ./ /built_app
---> 5a9788e6f412
Step 11/11 : RUN cd /built_app/programs/server && npm install --unsafe-perm
---> Running in 10ce78e8688e
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code E500
npm ERR! 500 Internal Server Error - GET https://codeload.github.com/meteor/node-source-map-support/legacy.tar.gz/1912478769d76e5df4c365e147f25896aee6375e
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-23T14_17_52_042Z-debug.log
The command '/bin/sh -c cd /built_app/programs/server && npm install --unsafe-perm' returned a non-zero code: 1
[134.209.106.56] x Prepare Bundle: FAILED
我最初认为这是节点版本不匹配,因为我最近更新了 Metoer,但Meteor node -v
显示我在节点 12.16 上并且 docker 映像设置为相同。