turbo
turbo copied to clipboard
Windows + tsx issue
Verify canary release
- [X] I verified that the issue exists in the latest Turborepo canary release.
Link to code that reproduces this issue
https://github.com/osztenkurden/turbo-tsx-googleapis-issue
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Which canary version will you have in your reproduction?
1.13.1-canary.0
Describe the Bug
Running turbo command, that invokes tsx watch FILE.ts
, when FILE.ts includs reference from googleapis
npm package results in no output, and no code being run. Removing watch
flag makes it work properly. This worked properly on 1.12.5, and breaks on 1.13+.
Expected Behavior
Referencing googleapis
in Typescript code should not freeze executing that file when run with tsx watch
To Reproduce
apps/backend/index.ts:
import { google } from 'googleapis';
console.log({ google })
apps/backend/package.json:
{
"name": "api",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "npx tsc"
},
"dependencies": {
"googleapis": "^134.0.0"
},
"devDependencies": {
"tsx": "^4.7.1",
"typescript": "^4.9.4"
}
}
./turbo.json:
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"dependsOn": ["prebuild", "^build"],
"outputs": ["output-file.txt", "dist/**"]
},
"prebuild": {},
"lint": {},
"type-check": {},
"dev": {
"cache": false
}
}
}
./package.json:
{
"name": "my-turborepo",
"description": "A barebones Turborepo example for working with Task Graphs.",
"devDependencies": {
"turbo": "canary"
},
"scripts": {
"dev": "turbo run dev"
},
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
"packages/*"
]
}
Running npm run dev
should result in logging the content of the google
object from googleapis
. Currently it hangs:
This works fine in 1.12.5, as well when manually executing npx tsc watch src/index.ts
Additional context
No response