fix: use --no-cache in parallel yarn install fallback
Parallel yarn install commands (renderer + client) corrupt the shared yarn cache, causing vite/pixi.js to be missing despite yarn install succeeding. Add --no-cache to the final fallback install to force a clean fetch from the registry.
This commit is contained in:
1 parent
8b7298657d
commit
6f53ca514d
1 file changed
+6
-2
+6
-2
@@ -1138,7 +1138,9 @@ update_renderer() {
|
|||||||
if [ ! -d node_modules/pixi.js ]; then
|
if [ ! -d node_modules/pixi.js ]; then
|
||||||
warn "Renderer: node_modules incomplete — cleaning and doing full install"
|
warn "Renderer: node_modules incomplete — cleaning and doing full install"
|
||||||
clean_node_modules
|
clean_node_modules
|
||||||
yarn install >> "$LOG_FILE" 2>&1 || { spinner_stop fail; die "yarn install failed (see: %s)" "$LOG_FILE"; }
|
# Parallel yarn installs (renderer + client) can corrupt the shared
|
||||||
|
# yarn cache, so force a clean fetch with --no-cache as a last resort.
|
||||||
|
yarn install --no-cache >> "$LOG_FILE" 2>&1 || { spinner_stop fail; die "yarn install failed (see: %s)" "$LOG_FILE"; }
|
||||||
fi
|
fi
|
||||||
spinner_stop ok; ok "Renderer dependencies installed"
|
spinner_stop ok; ok "Renderer dependencies installed"
|
||||||
else
|
else
|
||||||
@@ -1166,7 +1168,9 @@ update_client() {
|
|||||||
if [ ! -x node_modules/.bin/vite ]; then
|
if [ ! -x node_modules/.bin/vite ]; then
|
||||||
warn "Nitro-V3: vite missing after install — cleaning node_modules and doing full install"
|
warn "Nitro-V3: vite missing after install — cleaning node_modules and doing full install"
|
||||||
clean_node_modules
|
clean_node_modules
|
||||||
yarn install >> "$LOG_FILE" 2>&1 || { spinner_stop fail; die "yarn install failed (see: %s)" "$LOG_FILE"; }
|
# Parallel yarn installs (renderer + client) can corrupt the shared
|
||||||
|
# yarn cache, so force a clean fetch with --no-cache as a last resort.
|
||||||
|
yarn install --no-cache >> "$LOG_FILE" 2>&1 || { spinner_stop fail; die "yarn install failed (see: %s)" "$LOG_FILE"; }
|
||||||
fi
|
fi
|
||||||
spinner_stop ok
|
spinner_stop ok
|
||||||
spinner_start "Building frontend..."
|
spinner_start "Building frontend..."
|
||||||
|
|||||||
Reference in new issue
Block a user