diff --git a/README.md b/README.md index a83d516..0e2b13d 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ API docs available at `http://localhost:8000/docs`. ## Frontend quick start -**Requirements:** Node.js 22+, [pnpm](https://pnpm.io/) +**Requirements:** Node.js 24 LTS+, [pnpm](https://pnpm.io/) ```bash cd frontend diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index fe6f0dc..cee0073 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -64,12 +64,19 @@ curl -LsSf https://astral.sh/uv/install.sh | sh source $HOME/.local/bin/env # or re-login ``` -### Node.js 22 + pnpm +### Node.js 24 LTS + pnpm ```bash -curl -fsSL https://deb.nodesource.com/setup_22.x | bash - -apt install -y nodejs -npm install -g pnpm +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash +. "$HOME/.nvm/nvm.sh" +nvm install 24 +corepack enable pnpm +``` + +Create a stable symlink so systemd can find `node` at a fixed path: + +```bash +ln -sf "$(nvm which current)" /usr/local/bin/node ``` ### Application user diff --git a/systemd/innercontext-node.service b/systemd/innercontext-node.service index 6f82e10..785d5dd 100644 --- a/systemd/innercontext-node.service +++ b/systemd/innercontext-node.service @@ -10,7 +10,7 @@ WorkingDirectory=/opt/innercontext/frontend Environment=PORT=3000 Environment=HOST=127.0.0.1 EnvironmentFile=/opt/innercontext/frontend/.env.production -ExecStart=/usr/bin/node /opt/innercontext/frontend/build/index.js +ExecStart=/usr/local/bin/node /opt/innercontext/frontend/build/index.js Restart=on-failure RestartSec=5