Skip to content

fix: add prepare script so github: installs build lib/ - #32

Open
Liangebra wants to merge 1 commit into
NanmiCoder:mainfrom
Liangebra:fix/github-install-build
Open

fix: add prepare script so github: installs build lib/#32
Liangebra wants to merge 1 commit into
NanmiCoder:mainfrom
Liangebra:fix/github-install-build

Conversation

@Liangebra

Copy link
Copy Markdown

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.

Copilot AI lite review requested due to automatic review settings August 16, 2026 03:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 prepare lifecycle script to build lib/ when the package is installed from a Git repository (where prepublishOnly is not run).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Outdated
},
"scripts": {
"build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json && tsdown",
"prepare": "pnpm build",
@Liangebra
Liangebra force-pushed the fix/github-install-build branch from 8c7884e to b65db65 Compare August 16, 2026 04:07
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