fix(deploy): install frontend prod deps on server after deploy

adapter-node bundles the SvelteKit framework but leaves package.json
`dependencies` (clsx, bits-ui, etc.) external — they must be present in
node_modules on the server at runtime.

- deploy.sh: rsync package.json + pnpm-lock.yaml, run pnpm install --prod
- DEPLOYMENT.md: add pnpm to server setup with explanation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-03-01 13:56:28 +01:00
parent 3428885aaa
commit 91bc9e86d7
2 changed files with 19 additions and 4 deletions

View file

@ -21,8 +21,12 @@ deploy_frontend() {
echo "==> [frontend] Building locally..."
(cd frontend && pnpm run build)
echo "==> [frontend] Uploading build/..."
echo "==> [frontend] Uploading build/ and package files..."
rsync -az --delete frontend/build/ "$SERVER:$REMOTE/frontend/build/"
rsync -az frontend/package.json frontend/pnpm-lock.yaml "$SERVER:$REMOTE/frontend/"
echo "==> [frontend] Installing production dependencies on server..."
ssh "$SERVER" "cd $REMOTE/frontend && pnpm install --prod --frozen-lockfile"
echo "==> [frontend] Restarting service..."
ssh "$SERVER" "sudo systemctl restart innercontext-node && echo OK"