chore: update pnpm version to 11.5.3 and enable Nx daemon in dev container

This commit is contained in:
Denys Vuika
2026-07-07 15:02:57 +00:00
parent d4ea7a43b0
commit c34bd87b0b
3 changed files with 50 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
# or some Docker/Buildx versions can fail to parse it. # or some Docker/Buildx versions can fail to parse it.
FROM mcr.microsoft.com/devcontainers/javascript-node@sha256:21b17a0c1fd000eff7280c9eea21f04779d1825531b144e400e5d028a0d967b1 FROM mcr.microsoft.com/devcontainers/javascript-node@sha256:21b17a0c1fd000eff7280c9eea21f04779d1825531b144e400e5d028a0d967b1
ARG PNPM_VERSION=11.5.0 ARG PNPM_VERSION=11.5.3
ENV PNPM_HOME=/home/node/.local/share/pnpm ENV PNPM_HOME=/home/node/.local/share/pnpm
ENV PATH=${PNPM_HOME}:${PATH} ENV PATH=${PNPM_HOME}:${PATH}
+2 -2
View File
@@ -7,7 +7,7 @@
"dockerfile": "Dockerfile", "dockerfile": "Dockerfile",
"context": ".", "context": ".",
"args": { "args": {
"PNPM_VERSION": "11.5.0" "PNPM_VERSION": "11.5.3"
} }
}, },
@@ -44,7 +44,7 @@
}, },
"containerEnv": { "containerEnv": {
"CI": "true", "NX_DAEMON": "true",
"NODE_ENV": "development", "NODE_ENV": "development",
"NO_UPDATE_NOTIFIER": "1", "NO_UPDATE_NOTIFIER": "1",
"PNPM_STORE_DIR": "/home/node/.pnpm-store", "PNPM_STORE_DIR": "/home/node/.pnpm-store",
+47
View File
@@ -36,6 +36,18 @@ You can replace `<project>` with any workspace project name, for example `core`,
Tip: to discover available projects and targets, run `pn nx show projects` and inspect each project's `project.json` (or workspace configuration). Tip: to discover available projects and targets, run `pn nx show projects` and inspect each project's `project.json` (or workspace configuration).
## Nx Daemon and Graph Ports in Dev Containers
For this repository's VS Code Dev Container, Nx daemon is enabled (`NX_DAEMON=true`) to speed up repeated local Nx commands by keeping project graph state warm between runs.
Notes:
- Avoid forcing `CI=true` in day-to-day dev containers if you want daemon benefits.
- Keep `CI=true` for real CI pipelines and short-lived/ephemeral containers.
- If needed, disable daemon for a single command with `NX_DAEMON=false pn nx <target>`.
When running Nx commands, VS Code may show a notification about a port being opened by Nx Graph. This is expected when Nx serves the graph UI locally; it is typically a localhost-only temporary port used for visualization.
## Git Operations and Signing ## Git Operations and Signing
You can use Git inside the container, outside the container, or split responsibilities for better key safety. You can use Git inside the container, outside the container, or split responsibilities for better key safety.
@@ -107,3 +119,38 @@ Useful files to inspect:
- [.devcontainer/devcontainer.json](../.devcontainer/devcontainer.json) - [.devcontainer/devcontainer.json](../.devcontainer/devcontainer.json)
- [.devcontainer/Dockerfile](../.devcontainer/Dockerfile) - [.devcontainer/Dockerfile](../.devcontainer/Dockerfile)
- VS Code Dev Containers logs under your local VS Code logs directory - VS Code Dev Containers logs under your local VS Code logs directory
### Nx Daemon Not Starting in Container
If `NX_DAEMON=true` is set but `pn nx daemon` still reports that the daemon is not running, Nx may have persisted a stale disable marker from a previous startup failure.
Recovery steps:
1. Reset Nx local state:
```bash
pnpm nx reset
```
2. Run any Nx command to trigger daemon startup:
```bash
pnpm nx show projects
```
3. Verify daemon status:
```bash
pnpm nx daemon
```
4. If still not running, inspect logs:
```bash
cat .nx/workspace-data/d/daemon.log
```
Notes:
- In Docker/dev containers, Nx disables daemon by default unless explicitly enabled.
- This repository enables it via `NX_DAEMON=true` in [.devcontainer/devcontainer.json](../.devcontainer/devcontainer.json).