pnpm 11 aborts with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY when it
detects an existing node_modules directory and there is no TTY to confirm
purging it. This happens in Portainer when BuildKit layer cache reuses a
prior deps stage containing node_modules.
- .npmrc: set confirmModulesPurge=false (skip prompt unconditionally)
- Dockerfile deps stage: set CI=true (belt-and-suspenders for pnpm CI mode)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>