turbo: Doesn't work with a new repo when using npm [turborepo]

What version of Turborepo are you using?

1.10.3

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

npm

What operating system are you using?

Mac

Describe the Bug

npm run dev

> dev
> turbo run dev

• Running dev
• Remote caching disabled
**root task dev (turbo run dev) looks like it invokes turbo and might cause a loop**

No tasks were executed as part of this run.

 Tasks:    0 successful, 0 total
Cached:    0 cached, 0 total
  Time:    739ms

 ERROR  run failed: command  exited (1)

Expected Behavior

Obviously, a freshly generated project should work after “npm run dev” or any other npm or turbo command.

I checked with pnpm - and it works well with it.

To Reproduce

  • npx create-turbo@latest
  • select npm as a package manager
  • go into the project dir and run “npm run dev” (or “npx turbo run dev”)

Reproduction Repo

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 11
  • Comments: 35 (4 by maintainers)

Commits related to this issue

Most upvoted comments

change your version.

eg,1.9.1

I have same issue. after 1.10.5 1.10.4 is fine

Same here; Using 1.10.4 is fine, but after 1.10.5 turbo repo gives me the loop error. “looks like it invokes turbo and might cause a loop”

The solution for now is to fix the turbo package version to 1.10.4

{
  "devDependencies": {
    "turbo": "1.10.4"
  }
}

Also breaks for me with yarn 1.22.19 and turbo > 1.10.4 . As @gabriellet, pinning turbo 1.10.4 works

newbie advice: in my case i forgot to run pnpm(or npm or yarn) install first to install the dependencies, rerun turbo dev and it works

• Running start
• Remote caching disabled

No tasks were executed as part of this run.

 Tasks:    0 successful, 0 total
Cached:    0 cached, 0 total
  Time:    995ms

same problem

I have same issue. after 1.10.5
1.10.4 is fine

Also breaks for me with yarn 1.22.19 and turbo > 1.10.4 . As @gabriellet, pinning turbo 1.10.4 works

This worked for me too, but it is concerning that breaking changes like this have been introduced 😬

I’m seeing this issue on my mac, using the “latest” turbo in package.json.

I started with the basic example project, then I renamed the “web” app to something else and that’s when it broke for me with the error listed above.

Per other comments, I tried reverting back to Turbo 1.10.4 and the issue went away.

Interesting…I then set turbo back to “latest” in my root package.json and reinstalled turbo (which appears to be 1.10.9) and it works. So reverting fixed it, then enabled me to go back to latest? As if the latest version doesn’t like changes to a top-level within the apps directory.

Edit: If it helps, my packageManger is “npm@8.5.5”.

I was using package.json5 - works for pnpm, but turbo doesn’t see them, had to change them to json.

I got this error when I was in a yarn project but it got package-lock.json file in it by accident. Removing extra lock file helped

Same issue with : “packageManager”: “yarn@1.22.17”, and “turbo”: “^1.10.12”

same issue with: yarn: 1.22.19 turbo: 1.10.12

having the same issue! not npm tho, using yarn berry.

I have this problem on a Mac using yarn with versions 1.10.3 and 1.10.6. I don’t see the issue on 1.10.4 though.