Skip to content

chore: add prepare script so github-installed consumers get dist/ - #1

Merged
pauldelucia merged 1 commit into
masterfrom
chore/prepare-script-for-github-installs
Jun 1, 2026
Merged

pauldelucia merged 1 commit into
masterfrom
chore/prepare-script-for-github-installs

Conversation

@pauldelucia

Copy link
Copy Markdown
Contributor

Summary

When this package is installed via a git ref (e.g. "github:willow-network/willow-sdk-typescript" in a consumer's package.json), npm checks out the source but doesn't run any build — so the resolved dependency has no dist/ and consumers fail with Cannot find module '@willow-network/sdk'.

prepare runs automatically after npm install both in this repo's own dev flow AND for git-installed consumers. Same idiom most TS libs use to be installable straight from git without first being published to npm.

prepublishOnly stays — it's the canonical pre-npm-publish hook.

Motivation

Hit this trying to use the SDK as a github dep from the new (in-progress) willow-mcp repo. Once @willow-network/sdk is published to npm proper, github-ref installs become less relevant — but until then, this unblocks any downstream consumer pulling from git.

When this package is installed via a git ref (e.g.
"github:willow-network/willow-sdk-typescript" in a consumer's
package.json) npm checks out the source but doesn't run any build, so
the resolved dependency has no dist/ and consumers fail with
"Cannot find module '@willow-network/sdk'".

prepare runs automatically after npm install both in this repo's own
dev flow AND for git-installed consumers. Same idiom most TS libs use
to be installable straight from git without first being published to
npm. prepublishOnly stays — it's the canonical pre-npm-publish hook.
@pauldelucia
pauldelucia merged commit 14228bf into master Jun 1, 2026
@pauldelucia
pauldelucia deleted the chore/prepare-script-for-github-installs branch June 1, 2026 09:51
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.

2 participants