fix: invoke pnpm by absolute path in Makefile, fix target path#48
Merged
Conversation
The pnpm install only adds $PNPM_HOME/bin to PATH via ~/.bashrc, which
non-interactive make recipes never source, so every dependent target
(node, http-server, netlify, fkill, bats) died on a bare `pnpm`:
make: pnpm: No such file or directory -> Error 127
Also, modern pnpm (v11) installs to ~/.local/share/pnpm/bin/pnpm, not
~/.local/share/pnpm/pnpm, so the old target file was never created and
make re-ran the installer every time.
Define PNPM_HOME and invoke the absolute pnpm binary with PNPM_HOME set
and its global bin dir on PATH (pnpm refuses `i -g` otherwise). Point
the prerequisite at the real binary path.
Verified in a fresh ubuntu:24.04 container: node 24.16.0 and bats 1.13.0
now install cleanly (exit 0).
Fixes #47
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The pnpm installer only adds
$PNPM_HOME/binto PATH via~/.bashrc, which a non-interactivemakerecipe never sources. So every pnpm-dependent target (node,http-server,netlify,fkill,bats) failed calling barepnpm:Two underlying issues:
~/.local/share/pnpm/bin/pnpm, not~/.local/share/pnpm/pnpm, so the target file was never created and make re-ran the installer on every invocation.Fix
Invokes the absolute pnpm binary with
PNPM_HOMEset and its global bin dir on PATH (pnpm refusesi -gif the global bin dir isn't on PATH).Verification
Run in a fresh
ubuntu:24.04container against the new Makefile — previously-failing targets now succeed:Found via the same container test that validated #39/#40/#41/#42.
Fixes #47
🤖 Generated with Claude Code