(In these steps <module>
is any one of the following chalk
, prom-client
, swagger-stats
, googleapis
)
- Clone the repository.
- Run
npm install tsx concurrently
to install dependencies. - Run
npm install <module>
. - Run
npm run tsxWatch --module=<module>
, thennpm run concurrently-without-watch --module=<module>
, thennpm run watch-with-concurrently-hack --module=<module>
. You should see Everything is fine! in the console. - Run
npm run watch-with-concurrently --module=<module>
andtsx watch
will not run, and you will not see Everything is fine!.
- Fork this repository, then go to the Actions tab in your fork.
- Click on the action Scripts with no issue in the left pane.
- Click on Run workflow then Run workflow.
- After about a minute you should see all the jobs ended with success, because each run script had Everything is fine! in its output.
- Gob back and click on Reproduce tsx watch issue action in the left pane of the Actions tab.
- Click on Run workflow then Run workflow.
- Inspect the pending run, and specifically the Run issue causing script step, which is running the script
concurrently "npm run expect" "npm run tsxWatch"
, and you should see thatnpm run expect
ran successfully ("Expecting tsx watch to run ./src/using-chalk.ts..."
), butnpm run tsxWatch
doesn't run at all, and you will not see Everything is fine!, as can be seen in the following screenshot.
tsxWatch
script runs becausetsx watch
is running withoutconcurrently
.concurrently-without-watch
runs because we removedwatch
out of thetsx
script.watch-with-concurrently-hack
runs due to a workaround found by the turbo team.
tsx watch
hangs onWindows
even without usingconcurrently
as can be seen on that previously linked issue, which provides more evidence that this issue is not a concurrenlty or turbo issue but rather a tsx one.- The workaround proposed by the turbo team and used on the
watch-with-concurrently-hack
script cannot be considered a real solution becausenpm
scripts are used on different platforms but< NUL
is a windows thing.