forked from freeleaps/freeleaps-pub
Update for clean pnpm store before pnpm build
This commit is contained in:
parent
c166e61f9f
commit
2b1c13c01e
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user