How to get this error?
I am using Meteor 2.2 with Node 12.16.1 and CircleCI compiler @ version: 2.1 with latest docker image.
For a base I am using custom made docker "meteor-launchpad"
I have decided to upgrade our Meteor from 1.11.1 to 2.2
Failure occurs on command in script:
meteor build --directory "$APP_BUNDLE_DIR" --server-only
"$APP_BUNDLE_DIR" is set during "meteor-launchpad" image creation (it already is set in image):
ENV APP_BUNDLE_DIR /opt/meteor/dist
This error was not (and is not) existing in 1.11.1 Meteor version
This error is NOT existing during image creation on my local server with Ubuntu 20
I have developed custom launchpad and added a way to use any Meteor release. Effect is that on Meteor 1.11.1 it is able to create image on CircleCI.
Not special user is being used on system (base image). It is standard: root @ debian:jessie
For node: user node is created with group node:
RUN groupadd -r node && useradd -m -g node node
I have tried giving access to some groups for users, but it has no effect:
RUN usermod -aG staff node
RUN usermod -aG node root
Flag for Meteor is set in launchpad: METEOR_ALLOW_SUPERUSER=true
I am not sure where to dig for more information to resolve that issue. Any ideas how to approach fixing that error? It says PERM error which suggest some privileges issues but installation is handled by root
user. Is there any environment value I need to set for CircleCI?
Detailed error from CircleCI (2.1) using 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'
}
CircleCI has documented a particular solution for a particular incompatibility between CircleCI's default
Docker 17.09.0-ce
and the NodeJS executor ofNodeJS > 14.9.0
:https://support.circleci.com/hc/en-us/articles/360050934711
If using the
setup_remote_docker
key in your CircleCI config, setting the Docker version like so resolves the issue: