Closed benzittlau closed 3 months ago
Unless turbo has specific (and unusual) handling for this, you likey want yarn turbo
. The global install is on your PATH
, but the project one is not, so executing turbo
by name is shell resolution that is not aware of local dependencies at all. It would be that way with any executable npm module.
Note that instead of a global install, you can alias it like this, and it'll use the project one if present or the latest from npm if not:
alias turbo='npx -y turbo'
or for yarn 2+ (if memory serves)
alias turbo='yarn dlx turbo'
@ehaynes99 turbo
does indeed have special handling for this! Doc: https://turbo.build/repo/docs/getting-started/installation#repository-installation
However, it looks like this inference is not working across major versions and we'll work to get that fixed.
Marking as duplicate for #8309. Despite this report coming first, folks are having a more lively conversation there.
Thank you for creating this report, Ben.
Verify canary release
Link to code that reproduces this issue
yarn global add turbo@latest
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.0.0-canary.4
Describe the Bug
With a local 1.X.X version of turbo installed in the local repository, but the latest turbo (2.0.1) installed globally via yarn,
turbo build
(or other tasks) fails to find the tasks within other packages.Expected Behavior
The turbo task should successfully execute against the matching tasks in packages within the repo.
To Reproduce
Create a turbo repository that has a turbo 1.X.X installed in the local repo root, and then install turbo 2.0.1 globally via yarn:
Then try and execute a task:
Turbo will fail to find/execute the packages matching tasks.
Additional context
This was initially discussed in GitHub and the cause diagnosed by the user Anthony: https://discord.com/channels/818588653005176832/818588653147389957/1247720176422486098