Problem
npm install -g thompsonson/codeburn#<tag> fails with tsup: not found during the prepare lifecycle script.
npm error npm error command sh -c npm run build
npm error npm error > codeburn@0.9.1-thompsonson.1 build
npm error npm error > tsup
npm error npm error sh: 1: tsup: not found
Root Cause
npm install -g <github-url> only installs production dependencies before running prepare. DevDependencies (where tsup lives) are not installed at that point, so the build tool is missing.
This is general npm behaviour — not a codeburn bug — but it affects any package installed directly from GitHub with a build step.
Fix
Change prepare in package.json to use npx:
"prepare": "npx --yes tsup"
npx --yes downloads and runs tsup on the fly if not found. No dist in git, no registry publish needed.
Current workaround
PR #6 ships a pre-built dist/ in the repo. This works but is an anti-pattern (bloats git history, can go out of sync with source).
References
Problem
npm install -g thompsonson/codeburn#<tag>fails withtsup: not foundduring thepreparelifecycle script.Root Cause
npm install -g <github-url>only installs production dependencies before runningprepare. DevDependencies (wheretsuplives) are not installed at that point, so the build tool is missing.This is general npm behaviour — not a codeburn bug — but it affects any package installed directly from GitHub with a build step.
Fix
Change
prepareinpackage.jsonto usenpx:npx --yesdownloads and runstsupon the fly if not found. No dist in git, no registry publish needed.Current workaround
PR #6 ships a pre-built
dist/in the repo. This works but is an anti-pattern (bloats git history, can go out of sync with source).References