如何得到这个错误?
我将 Meteor 2.2 与 Node 12.16.1 和 CircleCI 编译器 @ version: 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 的标志在启动板中设置:METEOR_ALLOW_SUPERUSER=true
我不确定在哪里可以找到更多信息来解决这个问题。任何想法如何解决该错误?它说PERM错误,这表明存在一些权限问题,但安装由root
用户处理。我需要为 CircleCI 设置任何环境值吗?
CircleCI (2.1) 使用 Meteor (2.2) 的详细错误:
[-] 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'
}