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:
parent
3428885aaa
commit
91bc9e86d7
2 changed files with 19 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue