ERROR: Service 'mfe' failed to build : Build failed

I’m getting this error when plugin of mfe is enabled, but when I disabled it working fine.
Case, I’m working on tutor, and I have force to reinstall my tutor and still facing the same error, does anyone know why?

 > [account-dev 3/5] RUN npm clean-install --no-audit --no-fund --registry=   && rm -rf ~/.npm:
#15 20.23 npm WARN deprecated urix@0.1.0: Please see
#15 20.24 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 for details.
#15 23.96 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 <>.
#15 25.25 npm WARN deprecated source-map-url@0.4.1: See
#15 25.48 npm WARN deprecated source-map-resolve@0.5.3: See
#15 27.88 npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
#15 29.33 npm WARN deprecated resolve-url@0.2.1:
#15 29.35 npm WARN deprecated resolve-url-loader@5.0.0-beta.1: version 5 is now released
#15 31.92 npm WARN deprecated redux-devtools-extension@2.13.9: Package moved to @redux-devtools/extension.
#15 36.40 npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
#15 37.65 npm notice
#15 37.65 npm notice New minor version of npm available! 8.5.0 -> 8.12.1
#15 37.65 npm notice Changelog: <>
#15 37.65 npm notice Run `npm install -g npm@8.12.1` to update!
#15 37.65 npm notice
#15 37.65 npm ERR! code ERR_SOCKET_TIMEOUT
#15 37.65 npm ERR! network Socket timeout
#15 37.65 npm ERR! network This is a problem related to network connectivity.
#15 37.65 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#15 37.65 npm ERR! network
#15 37.65 npm ERR! network If you are behind a proxy, please make sure that the
#15 37.65 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#15 37.68
#15 37.68 npm ERR! A complete log of this run can be found in:
#15 37.68 npm ERR!     /root/.npm/_logs/2022-06-14T08_21_07_298Z-debug-0.log
executor failed running [/bin/sh -c npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY   && rm -rf ~/.npm]: exit code: 1
ERROR: Service 'mfe' failed to build : Build failed
Error: Command failed with status 1: docker-compose -f /Users/agus/Library/Application Support/tutor/env/local/docker-compose.yml -f /Users/agus/Library/Application Support/tutor/env/local/ -f /Users/agus/Library/Application Support/tutor/env/local/docker-compose.tmp.yml --project-name tutor_local up --remove-orphans --build -d

Meanwhile, I also reported this issue here: ERROR: Service 'mfe' failed to build : Build failed · Issue #55 · overhangio/tutor-mfe · GitHub
but he said to move into this forum. please help me…

Note: I switched my internet provider as well, and give the same issue.
Also, I didn’t set any proxy for my laptop. and here is my npm config.

➜  ~ npm config get
; "user" config from /Users/agus/.npmrc

fetch-retries = 10
fetch-retry-maxtimeout = 600000
fetch-retry-mintimeout = 100000
python = "/usr/bin/python"
registry = ""

; node bin location = /usr/local/bin/node
; node version = v18.4.0
; npm local prefix = /Users/agus
; npm version = 8.12.1
; cwd = /Users/agus
; HOME = /Users/agus
; Run `npm config ls -l` to show all defaults.
1 Like

got same error!
on Ubuntu 18.04 when upgrade from mfe 13 to 14 (and tutor from 13 to 14), after build:

docker-compose -f /tutor/env/local/docker-compose.yml -f /tutor/env/local/ -f /tutor/env/local/docker-compose.tmp.yml --project-name tutor_local up --remove-orphans --build -d
Error parsing bundle asset "/openedx/app/dist/968.87d5401583d0d476c683.js": no such file
Error parsing bundle asset "/openedx/app/dist/app.3f728c20eecc69435441.js": no such file
Error parsing bundle asset "/openedx/app/dist/runtime.3ffcd34ca6d38c334278.js": no such file

No bundles were parsed. Analyzer will show only original module sizes from stats file.

Webpack Bundle Analyzer saved report to /openedx/app/dist/report.html
assets by status 1.14 MiB [cached] 7 assets
Entrypoint app = runtime.3ffcd34ca6d38c334278.js 968.87d5401583d0d476c683.js app.3f728c20eecc69435441.js 5 auxiliary assets
orphan modules 1.97 MiB [orphan] 794 modules
runtime modules 3.55 KiB 8 modules
cacheable modules 2.8 MiB 603 modules

WARNING in ./node_modules/react-responsive/dist/react-responsive.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find source file 'webpack:///dist/react-responsive.js': Error: Can't resolve './webpack:///dist/react-responsive.js' in '/openedx/app/node_modules/react-responsive/dist'
 @ ./node_modules/@edx/frontend-component-header/dist/Header.js 2:0-42 75:97-107 77:94-104
 @ ./node_modules/@edx/frontend-component-header/dist/index.js 1:0-30 5:15-21
 @ ./src/index.jsx

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

ERROR in ./src/index.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/image-webpack-loader/index.js):
Error: Cannot find module 'imagemin-mozjpeg'
Require stack:
- /openedx/app/node_modules/image-webpack-loader/index.js
- /openedx/app/node_modules/loader-runner/lib/loadLoader.js
- /openedx/app/node_modules/loader-runner/lib/LoaderRunner.js
- /openedx/app/node_modules/webpack/lib/NormalModuleFactory.js
- /openedx/app/node_modules/webpack/lib/Compiler.js
- /openedx/app/node_modules/webpack/lib/webpack.js
- /openedx/app/node_modules/webpack/lib/index.js
- /openedx/app/node_modules/webpack-cli/lib/webpack-cli.js
- /openedx/app/node_modules/webpack-cli/lib/bootstrap.js
- /openedx/app/node_modules/webpack-cli/bin/cli.js
- /openedx/app/node_modules/webpack/bin/webpack.js
- /openedx/app/node_modules/@edx/frontend-build/bin/fedx-scripts.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.module.exports (/openedx/app/node_modules/image-webpack-loader/index.js:74:20)
    at processResult (/openedx/app/node_modules/webpack/lib/NormalModule.js:713:19)
    at /openedx/app/node_modules/webpack/lib/NormalModule.js:819:5
    at /openedx/app/node_modules/loader-runner/lib/LoaderRunner.js:399:11
    at /openedx/app/node_modules/loader-runner/lib/LoaderRunner.js:251:18
    at runSyncOrAsync (/openedx/app/node_modules/loader-runner/lib/LoaderRunner.js:156:3)
    at iterateNormalLoaders (/openedx/app/node_modules/loader-runner/lib/LoaderRunner.js:250:2)
    at /openedx/app/node_modules/loader-runner/lib/LoaderRunner.js:223:4
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
 @ ./src/index.jsx 13:0-22

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack 5.50.0 compiled with 2 errors and 1 warning in 42162 ms
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.14.0
npm notice Changelog: <>
npm notice Run `npm install -g npm@8.14.0` to update!
npm notice
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: 1
ERROR: Service 'mfe' failed to build : Build failed

On another server (Ubuntu 20.04) mfe build OK

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.