Problem rebuilding MFE images

tutor, version 16.0.5

Trying to rebuild MFEs with
tutor images build mfe --no-cache

I didn’t like these warnings and error messages (especially the Integrity error)

348.6 npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js.
349.2 npm WARN deprecated core-js@2.6.12: core-js@<3.4 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. Please, upgrade your dependencies to the actual version of core-js.
431.8 npm notice 
431.8 npm notice New minor version of npm available! 9.5.1 -> 9.8.1
431.8 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.1>
431.8 npm notice Run `npm install -g npm@9.8.1` to update!
431.8 npm notice 
431.8 npm ERR! code 1
431.8 npm ERR! path /openedx/app/node_modules/sharp
431.8 npm ERR! command failed
431.8 npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
431.8 npm ERR! sharp: Using cached /root/.npm/_libvips/libvips-8.13.3-linux-x64.tar.br
431.8 npm ERR! sharp: Integrity expected: sha512-OTmlmP2r8ozGKdB96X+K5oQE1ojVZanqLqqKlwDpEnfixyIaDGYbVzcjWBNGU3ai/26bvkaCkjynnc2ecYcsuA==
431.8 npm ERR! sharp: Integrity received: sha512-trLwB591RehHMQylZB3atr1YMQrAXw05ysI8wkBFjO94LUx5/b2cf1s5j8/RRf/Ko1z6MEe7RBB/SGAskqBuqA==
431.8 npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
431.8 npm ERR! sharp: Installation error: Integrity check failed for linux-x64
431.9 
431.9 npm ERR! A complete log of this run can be found in:
431.9 npm ERR!     /root/.npm/_logs/2023-08-14T14_52_16_333Z-debug-0.log
------
Dockerfile:69
--------------------
  67 |     ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0
  68 |     ENV PACT_SKIP_BINARY_INSTALL=true
  69 | >>> RUN --mount=type=cache,target=/root/.npm,sharing=shared npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY
  70 |     
  71 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c npm clean-install --no-audit --no-fund --registry=$NPM_REGISTRY" did not complete successfully: exit code: 1
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx-mfe:16.1.0 --no-cache --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx-mfe:16.1.0-cache /home/ubuntu/.local/share/tutor/env/plugins/mfe/build/mfe

Any idea?

This does look like an error on npm’s side. Did you try running the same command again a few minutes later?

1 Like

Temporary communication issues? That’s the only thing I can see.

After 3 consecutive unsuccessful attempts, it seems to work now but I did stop tutor and all containers and rebuild openedx and ecommerce before rebuiling mfe.

tutor local stop
tutor images build openedx --no-cache 
tutor images build ecommerce --no-cache 
tutor images build mfe --no-cache

I will have to try it again on its own now…

Yes I did. Well, a variation on it. It seems to work again now.