gajus / turbowatch

Extremely fast file change detector and task orchestrator for Node.js.
Other
938 stars 23 forks source link

Inject /node_modules/.bin into PATH to mimic npm/pnpm/yarn scripts behaviour #35

Closed gajus closed 1 year ago

gajus commented 1 year ago

At the moment, if spawn scripts are referencing locally installed npm executables, they are going to be not found.

spawn`tsx`

will produce "tsx program not found"

Users can workaround this by prefixing them with pnpm (or whatever package manager), e.g.

spawn`pnpm tsx`

However, we should consider matching pnpm behaviour and just inject the appropriate path.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 2.18.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: