Merged PR 54: Update for clean pnpm store before pnpm build

Update for clean pnpm store before pnpm build
This commit is contained in:
Tianyong Qiu 2025-03-24 04:32:20 +00:00
commit c32b0563eb

View File

@ -787,15 +787,17 @@ if true ; then
cp pnpm-lock.yaml /tmp/pnpm-lock.yaml.bak
fi
# Remove node_modules directory
rm -rf node_modules
# 4⃣ Install dependencies
pnpm store prune
# 4⃣ Install dependencies (ensuring lockfile updates)
pnpm install --no-frozen-lockfile \\
--shamefully-hoist \\
--link-workspace-packages false \\
--store-dir /home/devbox/.pnpm-store
--store-dir /home/tmp/.pnpm-store
# 4⃣ Build the frontend
pnpm run build
@ -1197,21 +1199,24 @@ docker exec -i "$DEVBOX_NAME" bash <<EOF
# Clean up old dependencies
rm -rf node_modules
# Clean up old pnpm store
pnpm store prune
# Backup the pnpm-lock.yaml file
if [ -f "pnpm-lock.yaml" ]; then
mv pnpm-lock.yaml /tmp/pnpm-lock.yaml.bak
fi
# if /home/devbox/.pnpm-store exists, remove it
if [ -d "/home/devbox/.pnpm-store" ]; then
rm -rf /home/devbox/.pnpm-store
# if /home/tmp/.pnpm-store exists, remove it
if [ -d "/home/tmp/.pnpm-store" ]; then
rm -rf /home/tmp/.pnpm-store
fi
# Install dependencies
pnpm install --no-frozen-lockfile \\
--shamefully-hoist \\
--link-workspace-packages false \\
--store-dir /home/devbox/.pnpm-store || {
--store-dir /home/tmp/.pnpm-store || {
echo
echo "============================================================================================"
echo