CircleCI:构建 Meteor 2.2 docker 应用程序 - 失败

时间:2021-05-12 14:28:05

标签: node.js docker meteor circleci circleci-workflows

如何得到这个错误?

我使用的是 Meteor 2.2 和 Node 12.16.1 和 CircleCI 编译器 @ 版本:2.1 和最新的 docker 镜像。

对于基地,我使用定制的docker“meteor-launchpad”

我决定将我们的 Meteor 从 1.11.1 升级到 2.2

脚本中的命令失败:

meteor build --directory "$APP_BUNDLE_DIR" --server-only

“$APP_BUNDLE_DIR”是在“meteor-launchpad”镜像创建过程中设置的(它已经在镜像中设置了):

ENV APP_BUNDLE_DIR /opt/meteor/dist

此错误在 1.11.1 Meteor 版本中不存在(也不存在)

在使用 Ubuntu 20 的本地服务器上创建映像期间存在此错误

我开发了自定义启动板并添加了一种使用任何 Meteor 版本的方法。效果是在 Meteor 1.11.1 上可以在 CircleCI 上创建图像。

系统(基本映像)上没有使用特殊用户。它是标准的:root @ debian:jessie

对于节点:用组节点创建用户节点:

RUN groupadd -r node && useradd -m -g node node

我曾尝试为用户授予对某些组的访问权限,但没有任何效果:

RUN usermod -aG staff node
RUN usermod -aG node root

流星标志已在启动板中设置:METEOR_ALLOW_SUPERUSER=true

我不知道从哪里挖掘更多信息来解决这个问题。任何想法如何解决该错误?它说 PERM 错误,这表明存在一些权限问题,但安装由 root 用户处理。我需要为 CircleCI 设置任何环境值吗?

使用 Meteor (2.2) 的 CircleCI (2.1) 的详细错误:

[-] Building Meteor application...


Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app
directory will be incorrect if you ever attempt to perform any Meteor tasks as
a normal user. If you need to fix your permissions, run the following command
from the **** of your project:

  sudo chown -Rh <username> .meteor/local

/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: EPERM: operation not permitted, copyfile '/tmp/mt-1kbgw6u.nlqy/plugin.npm-check.os/npm/node_modules/meteor/babel-compiler/node_modules/resolve/.editorconfig' -> '/tmp/mt-1kbgw6u.nlqy/plugin.npm-check.os/npm/node_modules/meteor/babel-compiler/node_modules/.temp-ttjf6y.m2q6h/node_modules/resolve/.editorconfig'
    at Object.copyFileSync (fs.js:1907:3)
    at /****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1642:23
    at copyFile (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1697:3)
    at Object.cp_r (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:549:5)
    at /tools/isobuild/meteor-npm.js:429:11
    at Array.forEach (<anonymous>)
    at copyNpmPackageWithSymlinkedNodeModules (/tools/isobuild/meteor-npm.js:422:29)
    at /tools/isobuild/meteor-npm.js:358:7
    at Array.forEach (<anonymous>)
    at Object.rebuildIfNonPortable (/tools/isobuild/meteor-npm.js:345:27)
    at /tools/isobuild/bundler.js:428:19
    at Function._.each._.forEach (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:191:9)
    at Function.readDirsFromJSON (/tools/isobuild/bundler.js:427:9)
    at /tools/isobuild/bundler.js:2573:34
    at Function._.each._.forEach (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:186:9)
    at Function.readFromDisk (/tools/isobuild/bundler.js:2565:7)
    at Object.readJsImage (/tools/isobuild/bundler.js:3568:18)
    at /tools/isobuild/isopack.js:897:28
    at Function._.each._.forEach (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:186:9)
    at Isopack._loadUnibuildsFromPath (/tools/isobuild/isopack.js:894:7)
    at /tools/packaging/tropohouse.js:521:21
    at Function._.each._.forEach (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:186:9)
    at /tools/packaging/tropohouse.js:520:13
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at /tools/packaging/tropohouse.js:515:22
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at Object.download (/tools/packaging/tropohouse.js:427:20)
    at /tools/packaging/tropohouse.js:613:18
    at /tools/utils/buildmessage.js:609:21
    at /****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Promise.await (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at Object.forkJoin (/tools/utils/buildmessage.js:641:6)
    at exports.Tropohouse.downloadPackagesMissingFromMap (/tools/packaging/tropohouse.js:609:18)
    at /tools/project-context.js:857:25
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at /tools/project-context.js:856:20
    at /tools/packaging/catalog/catalog.js:100:5
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (/tools/packaging/catalog/catalog.js:99:31)
    at ProjectContext._downloadMissingPackages (/tools/project-context.js:855:13)
    at /tools/project-context.js:300:9
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ProjectContext._completeStagesThrough (/tools/project-context.js:290:18)
    at /tools/project-context.js:282:12
    at Function.run (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:289:14)
    at ProjectContext.prepareProjectForBuild (/tools/project-context.js:281:13)
    at /tools/cli/commands.js:1010:20
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at Object.main.captureAndExit (/tools/cli/main.js:275:29)
    at buildCommand (/tools/cli/commands.js:1007:8)
    at /tools/cli/commands.js:948:25
    at Function.run (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:289:14)
    at /tools/cli/commands.js:946:18
    at /****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Promise.await (/****/.meteor/packages/meteor-tool/.2.2.0.1j8auib.qcbe++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at /tools/cli/main.js:1529:7 {
  errno: -1,
  syscall: 'copyfile',
  code: 'EPERM',
  path: '/tmp/mt-1kbgw6u.nlqy/plugin.npm-check.os/npm/node_modules/meteor/babel-compiler/node_modules/resolve/.editorconfig',
  dest: '/tmp/mt-1kbgw6u.nlqy/plugin.npm-check.os/npm/node_modules/meteor/babel-compiler/node_modules/.temp-ttjf6y.m2q6h/node_modules/resolve/.editorconfig'
}

0 个答案:

没有答案