privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
8.64k stars 132 forks source link

Script not running when node=21, type="module", watchmode is enabled, is importing from "node:process" and using turborepo #528

Closed hornta closed 2 months ago

hornta commented 2 months ago

Acknowledgements

Minimal reproduction URL

https://github.com/hornta/node-jzrqb3/tree/main

Version

4.7.2

Node.js version

21.7.3

Package manager

pnpm

Operating system

Windows

Problem & expected behavior (under 200 words)

When all of these five conditions are met, this script is for some reason not running:

It seems that if one of these condition are NOT met, then the script executes successfully. I've pondered if I should've raised this issue in turborepo instead but I'm going to start here.


I expect to see You don't see me because I'm importing 'process' when I run pnpm turbo dev2 when standing in the root. Currently I'm not seeing that, not even an error.

Contributions

hornta commented 2 months ago

Closing because I found a fix for this. Turns out that if I enable the new "experimental UI" mode in turbo.json, it works! Closing this for now.