Skip to content

feat(pnpm): standardize store path and configuration#569

Merged
iloveitaly merged 5 commits into
railwayapp:mainfrom
iloveitaly:pnpm-cache-improvements
Jun 1, 2026
Merged

feat(pnpm): standardize store path and configuration#569
iloveitaly merged 5 commits into
railwayapp:mainfrom
iloveitaly:pnpm-cache-improvements

Conversation

@iloveitaly

@iloveitaly iloveitaly commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Railpack cached a hardcoded pnpm store path (/root/.local/share/pnpm/store/v3), but newer pnpm versions write to a different location. BuildKit was caching the wrong directory, so pnpm install cache hits never materialized.

Description

  • Set PNPM_HOME and PNPM_STORE_DIR explicitly during every pnpm install so the store path is known and consistent regardless of pnpm version or install method.
  • Point the BuildKit install cache at PNPM_STORE_DIR (/opt/pnpm/store) instead of the old hardcoded path, so cached layers match where pnpm actually stores packages.

Test

  • Extended pnpm-corepack-runtime-usage with a better-sqlite3 native dependency and workspace config.
  • Updated build plan snapshots to reflect the new pnpm store and home paths.

@iloveitaly iloveitaly changed the title fix(node): cache pnpm store feat(pnpm): standardize store path and configuration May 30, 2026
@iloveitaly iloveitaly force-pushed the pnpm-cache-improvements branch from 53d0236 to db103ea Compare June 1, 2026 08:11
* Move pnpm home to /opt/pnpm to follow standard Linux filesystem conventions.
* Explicitly configure PNPM_STORE_DIR to ensure cache consistency.
* Set PNPM environment variables during dependency installation to improve reliability.

Generated-by: aiautocommit
Update snapshots to reflect the migration of the pnpm store and home directory to /opt/pnpm, ensuring consistent paths across build plans and environment variables.

Generated-by: aiautocommit
@iloveitaly iloveitaly force-pushed the pnpm-cache-improvements branch from db103ea to f3f196d Compare June 1, 2026 09:53
@iloveitaly iloveitaly merged commit 287dcb5 into railwayapp:main Jun 1, 2026
412 of 459 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant