Skip to content

fix(box)+fix(cli): caché npm del Box sin entradas de root; el CLI rodea una caché ajena e instala expo cuando falta - #1013

Merged
edgar-durand merged 1 commit into
mainfrom
fix/box-npm-cache-expo-core-v3
Oct 31, 2026
Merged

edgar-durand merged 1 commit into
mainfrom
fix/box-npm-cache-expo-core-v3

Conversation

@edgar-durand

@edgar-durand edgar-durand commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

La imagen v2.76.41 corrió npm install -g expo como root con npm_config_cache=/opt/npm-cache: cada npm install del usuario box fallaba con EACCES (irreparable dentro de un contenedor --cap-drop ALL) y la instalación de dependencias del preview moría en todo Box nuevo. El bake usa su propia caché, hace chown de la del box y el build falla si queda una entrada ajena. npmCacheOverride apunta npm a ~/.npm cuando la caché configurada tiene entradas de otro usuario (los Boxes creados con la imagen mala se curan solos). El arranque de Expo instala también expo (SDK deducido del react-native del proyecto) cuando el proyecto no lo tiene.

Sustituye a #1012 (cabecera del commit > 100 caracteres).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…ign cache and installs expo

v2.76.41's image ran 'npm install -g expo' as root with npm_config_cache=/opt/npm-cache, so every
'npm install' of the box user failed EACCES on '_cacache/index-v5/…' (unfixable inside a
--cap-drop ALL container): the preview's dependency installs died on every new Box. The bake now
uses its own cache, chowns the box's and the build fails on any entry the box does not own.
npmCacheOverride (run-setup.ts) points npm at ~/.npm when the configured cache holds another
user's entries — boxes created with the bad image heal on the next install. The Expo bring-up
also installs 'expo' itself (SDK from the project's react-native) when a project lacks it: a Remix
MOBILE project's export declared only expo-* modules, and 'expo start' needs expo.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@edgar-durand
edgar-durand merged commit afd3905 into main Oct 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants