From f03344599b0935f167380989e8a2e3d7bd8d4e6b Mon Sep 17 00:00:00 2001 From: Jiawen Geng Date: Sat, 15 Aug 2026 02:02:34 +0800 Subject: [PATCH] Pre-install pnpm alongside yarn in base image (#357) * Pre-install pnpm alongside yarn in base image Install pnpm globally in the Node.js provisioner so base images include both common package managers. Assisted-by: Cursor Agent Co-authored-by: Jiawen Geng * Install yarn and pnpm in a single npm command Assisted-by: Cursor Agent Co-authored-by: Jiawen Geng * Configure PNPM_HOME in the base image shell profile Assisted-by: Cursor Agent Co-authored-by: Jiawen Geng --------- Co-authored-by: Cursor Agent --- templates/base.pkr.hcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/base.pkr.hcl b/templates/base.pkr.hcl index ee15a75..cd31067 100644 --- a/templates/base.pkr.hcl +++ b/templates/base.pkr.hcl @@ -121,8 +121,12 @@ build { "echo 'export PATH=\"/opt/homebrew/opt/node@24/bin:$PATH\"' >> ~/.zprofile", "source ~/.zprofile", "node --version", - "npm install --global yarn", + "npm install --global yarn pnpm", + "echo 'export PNPM_HOME=\"$HOME/Library/pnpm\"' >> ~/.zprofile", + "echo 'export PATH=\"$PNPM_HOME:$PATH\"' >> ~/.zprofile", + "source ~/.zprofile", "yarn --version", + "pnpm --version", ] } provisioner "shell" {