Fix compose dev: isolate node_modules and remove host path leakage

This commit is contained in:
Ruslan Bakiev
2026-02-18 23:20:17 +07:00
parent 00452a81bc
commit 1999cff6de
2 changed files with 8 additions and 7 deletions

View File

@@ -4,8 +4,8 @@ set -euo pipefail
cd "$(dirname "$0")/.."
# Prevent path leakage between host Nuxt build cache and Docker runtime.
# Host-generated .nuxt can contain absolute /Users/... imports that break in /app.
rm -rf .nuxt .output
# If any cache contains absolute /Users/... imports, Nitro dev runtime can break in /app.
rm -rf .nuxt .output node_modules/.cache node_modules/.vite
# Install deps (container starts from a clean image).
# Fallback to npm install when lockfile was produced by a newer npm major.