这是indexloc提供的服务,不要输入任何密码
Skip to content

Misleading error when pnpm-workspace.yaml is missing #9224

@cjkihl

Description

@cjkihl

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

pnpm dlx create-turbo@canary

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

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.1.4-canary.1

Describe the Bug

If don't have a pnpm-workspace.yaml turbo throws this error which is miss leading:
× root task //#dev (turbo dev) looks like it invokes turbo and might cause a loop

Screenshot 2024-10-06 at 7 35 32 AM

Related to discussion:
#5290 (reply in thread)

Expected Behavior

A warning or error message: monorepo configuration for pnpm could not be found. Make sure you have setup workspaces correctly. See https://pnpm.io/workspaces

This will save users a lot of time debugging if they accidentally renamed or removed pnpm-workspace.yaml.

To Reproduce

1.Download a new turbo repo starter with pnpm pnpm dlx create-turbo@canary
2. Remove the pnpm-workspace.yaml
3. Run pnpm run dev
4. Turbo throws × root task //#dev (turbo dev) looks like it invokes turbo and might cause a loop

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions