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
|
|
@ -69,10 +69,12 @@ curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin sh
|
|||
|
||||
Installing to `/usr/local/bin` makes `uv` available system-wide (required for `sudo -u innercontext uv sync`).
|
||||
|
||||
### Node.js 24 LTS
|
||||
### Node.js 24 LTS + pnpm
|
||||
|
||||
The server only needs Node.js to **run** the pre-built frontend bundle.
|
||||
`pnpm` is **not** needed on the server — the frontend is always built locally.
|
||||
The server needs Node.js to **run** the pre-built frontend bundle, and pnpm to
|
||||
**install production runtime dependencies** (`clsx`, `bits-ui`, etc. —
|
||||
`adapter-node` bundles the SvelteKit framework but leaves these external).
|
||||
The frontend is never **built** on the server.
|
||||
|
||||
```bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
|
||||
|
|
@ -88,6 +90,15 @@ Use `--remove-destination` to replace any existing symlink with a real file:
|
|||
cp --remove-destination "$(nvm which current)" /usr/local/bin/node
|
||||
```
|
||||
|
||||
Install pnpm as a standalone binary — self-contained, no wrapper scripts,
|
||||
works system-wide:
|
||||
|
||||
```bash
|
||||
curl -fsSL "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linux-x64" \
|
||||
-o /usr/local/bin/pnpm
|
||||
chmod 755 /usr/local/bin/pnpm
|
||||
```
|
||||
|
||||
### Application user
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue