temporalio / temporalio/samples-typescript

[Bug] `npm install` in a sample directory without first `pnpm install` in root project results in `husky not found` error

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
465
Forks
148
Avg merge
1d 10h
Merged PRs (30d)
11

Description

Describe the bug

Since the refactor of the root project to be a PNPM workspace, running npm install in a single sample directory from a fresh git clone of the repository (i.e. without first running pnpm install in the root project) results in an error message to the effect that husky is missing.

How to reproduce
git clone github.com/temporalio/samples-typescript.git
cd samples-typescript/hello-world
npm install

results in

[...]

> prepare
> husky install

sh: husky: command not found
npm error code 127
npm error path /[...]/samples-typescript
npm error command failed
npm error command sh -c husky install
Extra
  • We may want to revert #405. That fix probably incorrect.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the root project’s install and prepare lifecycle and the package configuration used by the hello-world sample. Reproduce the issue from a fresh clone with npm install in hello-world, then trace why husky install runs without husky being available. Done means the documented sample-directory install completes successfully without a prior root pnpm install.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.