Production (alternate method) does not currently work
The MFE build fails when you try to run it as described in Production (alternate method):
When you include the MFEs in the config.yml
file like so:
MFE_ACCOUNT_MFE_APP:
name: account
port: 1997
repository: https://code.greenhost.net/totem/frontend/frontend-app-account.git
MFE_COMMON_VERSION: totem
MFE_GRADEBOOK_MFE_APP: null
MFE_LEARNING_MFE_APP:
name: learning
port: 2000
repository: https://code.greenhost.net/totem/frontend/frontend-app-learning.git
MFE_PROFILE_MFE_APP:
name: profile
port: 1995
repository: https://code.greenhost.net/totem/frontend/frontend-app-profile.git
tutor images build mfe
will encounter the following errors:
tutor@nutmeg:~/.local/share/tutor$ tutor images build mfe
Building image docker.io/overhangio/openedx-mfe:14.0.0
docker build -t docker.io/overhangio/openedx-mfe:14.0.0 /home/tutor/.local/share/tutor/env/plugins/mfe/build/mfe
Sending build context to Docker daemon 15.36kB
Step 1/87 : FROM docker.io/node:16.14-bullseye-slim AS base
---> c49c5d9e27d3
Step 2/87 : RUN apt update && apt install -y git gcc git libgl1 libxi6 make autoconf libtool pkg-config zlib1g-dev python g++
---> Using cache
---> 827197b32089
Step 3/87 : RUN mkdir -p /openedx/app /openedx/env
---> Using cache
---> 18bec7ae2e37
Step 4/87 : WORKDIR /openedx/app
---> Using cache
---> 70620e994fe8
Step 5/87 : ENV PATH ./node_modules/.bin:${PATH}
---> Using cache
---> ed4c052840e7
Step 6/87 : FROM base AS i18n
---> ed4c052840e7
Step 7/87 : COPY ./i18n /openedx/i18n
---> Using cache
---> 8cf6690910fa
Step 8/87 : RUN chmod a+x /openedx/i18n/*.js
---> Using cache
---> f7a69ea38764
Step 9/87 : RUN echo "copying i18n data" && mkdir -p /openedx/i18n/account && mkdir -p /openedx/i18n/learning && mkdir -p /openedx/i18n/profile echo "done."
---> Using cache
---> 32958641f51f
Step 10/87 : FROM base AS account-src
---> ed4c052840e7
Step 11/87 : RUN git clone https://code.greenhost.net/totem/frontend/frontend-app-account.git --branch totem --depth 1 .
---> Running in fbc4d8a40add
Cloning into '.'...
Removing intermediate container fbc4d8a40add
---> 5d67d076018c
Step 12/87 : RUN stat /openedx/app/src/i18n/messages 2> /dev/null || (echo "missing messages folder" && mkdir -p /openedx/app/src/i18n/messages)
---> Running in b3f0f98085fa
File: /openedx/app/src/i18n/messages
Size: 250 Blocks: 0 IO Block: 4096 directory
Device: 98h/152d Inode: 50575459 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-08-25 09:38:14.630844081 +0000
Modify: 2022-08-25 09:38:14.000000000 +0000
Change: 2022-08-25 09:38:14.626844039 +0000
Birth: 2022-08-25 09:38:14.610843870 +0000
Removing intermediate container b3f0f98085fa
---> 7049216ac0d3
Step 13/87 : FROM base AS account-i18n
---> ed4c052840e7
Step 14/87 : COPY --from=account-src /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
---> 4345a8e59175
Step 15/87 : COPY --from=i18n /openedx/i18n/account /openedx/i18n/account
---> 62d6196fc7e1
Step 16/87 : COPY --from=i18n /openedx/i18n/i18n-merge.js /openedx/i18n/i18n-merge.js
---> f8371844bda9
Step 17/87 : RUN /openedx/i18n/i18n-merge.js /openedx/app/src/i18n/messages /openedx/i18n/account /openedx/app/src/i18n/messages
---> Running in 2b1c54075b8e
Removing intermediate container 2b1c54075b8e
---> aab4009666e0
Step 18/87 : FROM base AS account-dev
---> ed4c052840e7
Step 19/87 : COPY --from=account-src /openedx/app/package.json /openedx/app/package.json
---> fee8c342c5a3
Step 20/87 : COPY --from=account-src /openedx/app/package-lock.json /openedx/app/package-lock.json
---> 4cfc233b1838
Step 21/87 : ARG NPM_REGISTRY=https://registry.npmjs.org/
---> Running in 94d16173dc3d
Removing intermediate container 94d16173dc3d
---> effa9a75e572
Step 22/87 : ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0
---> Running in d9f23c0fd653
Removing intermediate container d9f23c0fd653
---> 623e157ee6be
Step 23/87 : ENV PACT_SKIP_BINARY_INSTALL=true
---> Running in d17a186b3931
Removing intermediate container d17a186b3931
---> 2d57f1799950
Step 24/87 : RUN npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY && rm -rf ~/.npm
---> Running in c9e74a239819
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN old lockfile HttpErrorGeneral: 404 Not Found - GET https://registry.npmjs.org/@edx%2fbrand - Not found
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:103:15
npm WARN old lockfile at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9)
npm WARN old lockfile Could not fetch metadata for @edx/brand@1.1.4 HttpErrorGeneral: 404 Not Found - GET https://registry.npmjs.org/@edx%2fbrand - Not found
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:103:15
npm WARN old lockfile at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9) {
npm WARN old lockfile headers: [Object: null prototype] {
npm WARN old lockfile date: [ 'Thu, 25 Aug 2022 09:38:23 GMT' ],
npm WARN old lockfile 'content-type': [ 'application/json' ],
npm WARN old lockfile 'content-length': [ '21' ],
npm WARN old lockfile connection: [ 'keep-alive' ],
npm WARN old lockfile 'expect-ct': [
npm WARN old lockfile 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"'
npm WARN old lockfile ],
npm WARN old lockfile vary: [ 'Accept-Encoding' ],
npm WARN old lockfile server: [ 'cloudflare' ],
npm WARN old lockfile 'cf-ray': [ '74035abc9899b8ea-AMS' ],
npm WARN old lockfile 'x-fetch-attempts': [ '1' ],
npm WARN old lockfile 'x-local-cache-status': [ 'skip' ]
npm WARN old lockfile },
npm WARN old lockfile statusCode: 404,
npm WARN old lockfile code: 'E404',
npm WARN old lockfile method: 'GET',
npm WARN old lockfile uri: 'https://registry.npmjs.org/@edx%2fbrand',
npm WARN old lockfile body: { error: 'Not found' },
npm WARN old lockfile pkgid: '@edx/brand@1.1.4'
npm WARN old lockfile }
npm WARN old lockfile @edx/frontend-component-header: No matching version found for @edx/frontend-component-header@1.0.4.
npm WARN old lockfile at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9)
npm WARN old lockfile Could not fetch metadata for @edx/frontend-component-header@1.0.4 @edx/frontend-component-header: No matching version found for @edx/frontend-component-header@1.0.4.
npm WARN old lockfile at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9) {
npm WARN old lockfile code: 'ETARGET',
npm WARN old lockfile type: 'version',
npm WARN old lockfile wanted: '1.0.4',
npm WARN old lockfile versions: [
npm WARN old lockfile '1.0.0', '1.1.0', '1.1.1', '1.1.2',
npm WARN old lockfile '1.1.3', '1.1.4', '1.1.5', '2.0.0',
npm WARN old lockfile '2.0.1', '2.0.2', '2.0.3', '2.0.4',
npm WARN old lockfile '2.0.5', '2.0.6', '2.1.0', '2.2.0',
npm WARN old lockfile '2.2.1', '2.2.2', '2.2.3', '2.2.4',
npm WARN old lockfile '2.2.5', '2.2.6', '2.2.7', '2.3.0',
npm WARN old lockfile '2.4.0', '2.4.1', '2.4.2', '2.4.3',
npm WARN old lockfile '2.4.4', '2.4.5', '2.4.6', '2.5.0',
npm WARN old lockfile '2.6.0', '2.6.1', '3.0.0', '3.1.0',
npm WARN old lockfile '3.1.1', '3.1.3', '3.2.0'
npm WARN old lockfile ],
npm WARN old lockfile distTags: { latest: '3.2.0' },
npm WARN old lockfile defaultTag: 'latest'
npm WARN old lockfile }
npm WARN old lockfile @edx/frontend-component-footer: No matching version found for @edx/frontend-component-footer@1.1.20.
npm WARN old lockfile at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9)
npm WARN old lockfile Could not fetch metadata for @edx/frontend-component-footer@1.1.20 @edx/frontend-component-footer: No matching version found for @edx/frontend-component-footer@1.1.20.
npm WARN old lockfile at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9) {
npm WARN old lockfile code: 'ETARGET',
npm WARN old lockfile type: 'version',
npm WARN old lockfile wanted: '1.1.20',
npm WARN old lockfile versions: [
npm WARN old lockfile '1.0.0', '2.0.0', '2.0.1', '2.0.2', '2.0.3',
npm WARN old lockfile '3.0.0', '3.0.1', '3.0.2', '3.0.3', '3.0.4',
npm WARN old lockfile '3.0.5', '3.0.6', '3.0.7', '3.0.8', '3.0.9',
npm WARN old lockfile '4.0.0', '4.1.0', '4.1.1', '4.1.2', '4.1.3',
npm WARN old lockfile '4.1.4', '4.1.5', '5.0.0', '6.0.0', '6.0.1',
npm WARN old lockfile '6.0.2', '6.0.3', '7.0.0', '7.0.1', '7.0.2',
npm WARN old lockfile '7.0.3', '7.0.4', '7.0.5', '8.0.0', '9.0.0',
npm WARN old lockfile '9.0.1', '10.0.0', '10.0.1', '10.0.2', '10.0.3',
npm WARN old lockfile '10.0.4', '10.0.5', '10.0.6', '10.0.7', '10.0.8',
npm WARN old lockfile '10.0.9', '10.0.10', '10.0.11', '10.1.0', '10.1.1',
npm WARN old lockfile '10.1.2', '10.1.3', '10.1.4', '10.1.5', '10.1.6',
npm WARN old lockfile '10.2.0', '10.2.1', '10.2.2', '10.2.3', '10.2.4',
npm WARN old lockfile '10.3.0', '11.0.0', '11.1.0', '11.1.1', '11.1.2',
npm WARN old lockfile '11.2.0'
npm WARN old lockfile ],
npm WARN old lockfile distTags: { latest: '11.2.0' },
npm WARN old lockfile defaultTag: 'latest'
npm WARN old lockfile }
npm WARN old lockfile @edx/frontend-build: No matching version found for @edx/frontend-build@1.0.3.
npm WARN old lockfile at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9)
npm WARN old lockfile Could not fetch metadata for @edx/frontend-build@1.0.3 @edx/frontend-build: No matching version found for @edx/frontend-build@1.0.3.
npm WARN old lockfile at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9) {
npm WARN old lockfile code: 'ETARGET',
npm WARN old lockfile type: 'version',
npm WARN old lockfile wanted: '1.0.3',
npm WARN old lockfile versions: [
npm WARN old lockfile '1.0.0', '1.0.1', '1.1.0', '1.2.0',
npm WARN old lockfile '1.2.1', '1.2.2', '1.3.0', '1.3.1',
npm WARN old lockfile '2.0.0', '2.0.1', '2.0.2', '2.0.3',
npm WARN old lockfile '2.0.4', '2.0.5', '2.0.6', '3.0.0',
npm WARN old lockfile '3.1.0', '3.1.1', '3.1.2', '3.1.3',
npm WARN old lockfile '3.1.4', '3.1.5', '3.1.6', '3.1.7',
npm WARN old lockfile '3.1.8', '3.1.9', '3.1.10', '3.1.11',
npm WARN old lockfile '3.1.12', '3.1.13', '3.1.14', '3.1.15',
npm WARN old lockfile '3.1.16', '3.1.17', '3.1.18', '3.1.19',
npm WARN old lockfile '3.1.20', '4.0.0', '5.0.0', '5.0.1',
npm WARN old lockfile '5.0.2', '5.0.3', '5.0.4', '5.0.5',
npm WARN old lockfile '5.0.6', '5.0.7', '5.0.8', '5.0.9',
npm WARN old lockfile '5.0.10', '5.0.11', '5.0.12', '5.1.0',
npm WARN old lockfile '5.1.1', '5.1.2', '5.1.3', '5.2.0',
npm WARN old lockfile '5.2.1-alpha.1', '5.2.1', '5.2.2', '5.2.3',
npm WARN old lockfile '5.2.4', '5.2.5', '5.2.6', '5.2.7',
npm WARN old lockfile '5.2.8', '6.0.0-alpha.1', '5.2.9-alpha.1', '6.0.0-alpha.2',
npm WARN old lockfile '5.3.0', '5.3.1', '5.3.2', '5.4.0',
npm WARN old lockfile '5.5.0', '5.5.1', '5.5.2', '5.5.3',
npm WARN old lockfile '5.5.4', '5.5.5', '5.6.0', '5.6.1',
npm WARN old lockfile '5.6.2', '5.6.3', '5.6.4', '5.6.5',
npm WARN old lockfile '5.6.6', '5.6.7', '5.6.8', '5.6.9',
npm WARN old lockfile '5.6.10', '5.6.11', '5.6.12', '5.6.13',
npm WARN old lockfile '5.6.14', '6.0.0', '6.1.0', '7.0.0-alpha.1',
npm WARN old lockfile '6.1.1', '7.0.0', '7.0.1', '7.0.2',
npm WARN old lockfile ... 46 more items
npm WARN old lockfile ],
npm WARN old lockfile distTags: { latest: '12.0.3', alpha: '7.0.0-alpha.1' },
npm WARN old lockfile defaultTag: 'latest'
npm WARN old lockfile }
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated react-scrollspy@3.4.3: No longer actively maintained. Please use @makotot/ghostui instead.
npm WARN deprecated redux-devtools-extension@2.13.9: Package moved to @redux-devtools/extension.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated resolve-url-loader@5.0.0-beta.1: version 5 is now released
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated intl-messageformat-parser@1.4.0: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
npm WARN deprecated babel-plugin-react-intl@7.9.4: this package has been renamed to babel-plugin-formatjs
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @types/schema-utils@2.4.0: This is a stub types definition. schema-utils provides its own type definitions, so you do not need this installed.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated codecov@3.8.3: https://about.codecov.io/blog/codecov-uploader-deprecation-plan/
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated intl-messageformat-parser@5.5.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
npm WARN deprecated intl-messageformat-parser@6.1.2: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
npm WARN deprecated intl-relativeformat@2.2.0: This package has been deprecated, please see migration guide at 'https://github.com/formatjs/formatjs/tree/master/packages/intl-relativeformat#migration-guide'
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@3.18.2: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
added 2048 packages in 1m
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.18.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.18.0>
npm notice Run `npm install -g npm@8.18.0` to update!
npm notice
Removing intermediate container c9e74a239819
---> a54085883cbc
Step 25/87 : COPY --from=account-src /openedx/app /openedx/app
---> c46f57fa0886
Step 26/87 : COPY --from=account-i18n /openedx/app/src/i18n/messages /openedx/app/src/i18n/messages
---> fe8d196eeff6
Step 27/87 : ENV PUBLIC_PATH='/account/'
---> Running in da3b7cb1b8d5
Removing intermediate container da3b7cb1b8d5
---> f8fceaf24391
Step 28/87 : EXPOSE 1997
---> Running in 6e51c0a125e1
Removing intermediate container 6e51c0a125e1
---> d7151bfe223a
Step 29/87 : CMD ["npm", "run", "start"]
---> Running in 9c648b592960
Removing intermediate container 9c648b592960
---> 53e3c2995f23
Step 30/87 : FROM account-dev AS account
---> 53e3c2995f23
Step 31/87 : COPY ./env/production /openedx/env/production
---> cb975ed54cc4
Step 32/87 : RUN touch /openedx/env/production.override && echo "done setting production overrides"
---> Running in 740c0b8b82b4
done setting production overrides
Removing intermediate container 740c0b8b82b4
---> a488ba091dfd
Step 33/87 : RUN bash -c "set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build"
---> Running in 296ff5d997e5
> @totem/frontend-app-account@1.0.0-semantically-released build
> fedx-scripts webpack
sh: 1: fedx-scripts: not found
The command '/bin/sh -c bash -c "set -a && source /openedx/env/production && source /openedx/env/production.override && npm run build"' returned a non-zero code: 127
Error: Command failed with status 127: docker build -t docker.io/overhangio/openedx-mfe:14.0.0 /home/tutor/.local/share/tutor/env/plugins/mfe/build/mfe
(note, this is using tutor==14.0.0
, but it also happens with lower versions of Tutor)