fix: add prepare script so github: installs build lib/ - #32
Open
Liangebra wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub (git-hosted) installation failures by ensuring the lib/ build artifacts are generated during dependency installation, aligning the package’s declared entrypoints (main/exports) with what actually exists after a git install.
Changes:
- Add a
preparelifecycle script to buildlib/when the package is installed from a Git repository (whereprepublishOnlyis not run).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| }, | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json && tsdown", | ||
| "prepare": "pnpm build", |
Liangebra
force-pushed
the
fix/github-install-build
branch
from
August 16, 2026 04:07
8c7884e to
b65db65
Compare
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.
Installing via \dsh plugin --profile web add github:NanmiCoder/dsh-agent-teams\ currently fails to boot: the package declares \main: lib/index.js\ but git-hosted installs never run \prepublishOnly, so \lib/\ stays empty and the loader throws \Cannot find module .../lib/index.js.\n\npnpm runs the *\prepare* script for git dependencies, so adding \prepare: pnpm build\ makes the GitHub-install path build \lib/\ automatically (devDependencies are all published npm versions - no local dsh checkout needed). The npm-published package is unaffected.