turbo: [turborepo] `1.7.0` with yarn berry doesn't work

What version of Turborepo are you using?

1.7.0

What package manager are you using / does the bug impact?

Yarn v2/v3 (node_modules linker only)

What operating system are you using?

Mac

Describe the Bug

I’ve upgraded turbo version 1.6.3 -> 1.7.0.

I’ve got error like this

thread 'main' panicked at 'Failed to execute turbo.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', crates/turborepo/src/main.rs:23:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected Behavior

It should be work well like 1.6.3

To Reproduce

.yarnrc.yml

nodeLinker: pnp
yarn set version berry
yarn add turbo@1.7.0
yarn dev

Reproduction Repo

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 6
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

This should be fixed in turbo@1.7.5-canary.0

I know it isn’t official support yet but do you recommend using PnP mode with turbo?

image

it looks like the go-turbo binary is missing in the “yarn bin turbo” folder as a temporary workaround, I set the TURBO_BINARY_PATH manually in package.json

"build": "TURBO_BINARY_PATH=$(echo \"console.log(require('child_process').execSync('find .yarn/unplugged/turbo-'+process.platform+'-'+process.arch.replace(/^x/,'')+'-* -name turbo').toString())\" | node) turbo run build"
image

it looks like the go-turbo binary is missing in the “yarn bin turbo” folder as a temporary workaround, I set the TURBO_BINARY_PATH manually in package.json

"build": "TURBO_BINARY_PATH=$(echo \"console.log(require('child_process').execSync('find .yarn/unplugged/turbo-'+process.platform+'-'+process. Arch+'-* -name turbo').toString())\" | node) turbo run build"

@teamchong I think you made a typo error, it should be:

TURBO_BINARY_PATH=$(echo \"console.log(require('child_process').execSync('find .yarn/unplugged/turbo-'+process.platform+'-'+process.arch.replace('x', '')+'-* -name turbo').toString())\" | node) turbo run build

(note the process.arch instead of process. Arch))

Also, I needed to remove the x in x64 so I added .replace('x', '').

Awesome, thanks @alexghr I’ll take a look.

One note, for 1.7.0 there are two binaries now that need to be colocated. turbo and go-turbo

Hey, just to add to this: I’m seeing the same thing when using pnpm@7.24.3 and turbo@1.7.0. I’ve tried with node-linker=hoisted but I still get the same error.