Skip to content

build: run the build when installed from git - #47

Open
Joilence wants to merge 1 commit into
shreyaskarnik:mainfrom
Joilence:pr/prepare-script
Open

build: run the build when installed from git#47
Joilence wants to merge 1 commit into
shreyaskarnik:mainfrom
Joilence:pr/prepare-script

Conversation

@Joilence

@Joilence Joilence commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Why

main points at ./dist/index.js, but dist/ is gitignored. A git install therefore has no entry point:

$ npm install "git+https://github.com/shreyaskarnik/argo"
$ npx argo --version
ERR_MODULE_NOT_FOUND: .../@argo-video/cli/dist/index.js

Installs from npm are fine, since the tarball ships dist/ via files. That is the only path CI covers.

What

+  "prepare": "npm run build",

npm runs prepare for git dependencies after installing devDependencies, and typescript is already one. Tarball installs skip it, so npm users see no change.

Test

Same git URL both ways: without the fix dist/ is missing and the CLI crashes, with it argo --version prints 0.39.1. Suite: 753 pass.

Note: npm install here now builds too, so CI builds twice.

`dist/` is gitignored and `main` points at `./dist/index.js`, so
installing this package from a git URL produced a package whose entry
point did not exist. npm installs devDependencies and runs `prepare` for
git dependencies, and typescript is already a devDependency, so the
build just needs to be wired to that lifecycle hook.

Installing from the npm registry is unaffected: the published tarball
already ships `dist/`, and `prepare` does not run for registry installs
of a packed tarball.
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.

1 participant