Use pnpm copy method for Modal compatibility

Add --package-import-method=copy to all pnpm install commands in niteshift-setup.sh.
This ensures packages are copied instead of hard-linked, which is required for
proper functionality in Modal's containerized environment where hard links don't
work across filesystem layers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sajid Mehmood 2025-11-16 15:37:57 -05:00
parent 9d1b4e3665
commit 1c440c9e1c

View file

@ -71,18 +71,18 @@ log "✓ pnpm is available"
# 4. Install dependencies
if [[ "$USE_PREBAKED_SETUP" -eq 0 ]]; then
log "Installing dependencies with pnpm..."
if ! pnpm install --frozen-lockfile; then
if ! pnpm install --package-import-method=copy --frozen-lockfile; then
log_error "Failed to install dependencies"
exit 1
fi
log "✓ Dependencies installed"
else
log "Linking dependencies from prebaked pnpm store..."
if pnpm install --frozen-lockfile --offline; then
if pnpm install --package-import-method=copy --frozen-lockfile --offline; then
log "✓ Dependencies installed (offline)"
else
log_error "Offline install failed, falling back to full pnpm install"
if ! pnpm install --frozen-lockfile; then
if ! pnpm install --package-import-method=copy --frozen-lockfile; then
log_error "Failed to install dependencies even after fallback"
exit 1
fi