Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[turborepo] turbo 1.10.x not work with pnpm workspace exclude feature #5391

Closed
suhaotian opened this issue Jun 27, 2023 · 6 comments
Closed
Labels
kind: bug Something isn't working

Comments

@suhaotian
Copy link

What version of Turborepo are you using?

1.10.6

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

pnpm

What operating system are you using?

Mac

Describe the Bug

After update turbo to 1.10.6, the command with turbo (e.g pnpm lint) not work anymore:

> @acme/monorepo@ lint /Users/suhaotian/Projects/expo-monorepo-example
> turbo lint

• Running lint
• Remote caching disabled
root task lint (turbo lint) 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:    68ms 

But if I use [email protected] or If I delete these lines - '!**/dist**' and '!**/.next**' in the pnpm-workspace.yaml, it will work:

packages:
  - 'apps/*'
  - 'packages/**'

  # exclude dist projects
  - '!**/dist**'
  # exclude .next projects
  - '!**/.next**'

Expected Behavior

Should work after bump turbo version

To Reproduce

pnpm install
pnpm lint
# or
pnpm build

Reproduction Repo

https://github.com/suhaotian/expo-monorepo-example/tree/bump-deps

@suhaotian suhaotian added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Jun 27, 2023
@zxlisrich
Copy link

I have same problem

@gabriellet
Copy link

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.

@gsoltis gsoltis removed the needs: triage New issues get this label. Remove it after triage label Jun 29, 2023
@gsoltis
Copy link
Contributor

gsoltis commented Jun 29, 2023

@suhaotian @zxlisrich @gabriellet

Here's what's going on: we've started tightening some of our glob validation, and

  1. the exclusion globs are not technically valid (up for debate, different libraries have different rules)
  2. we're not doing a great job reporting what the actual error is (we should be telling you which glob had the problem)

So, short term fix: for !**/dist**, decide if you mean !**/dist*/** or !**/dist/** (probably this one), and update your glob accordingly, and then do the same for !**/.next**.

We'll work on, at minimum, getting a better error message in place. I'm not sure if we need to relax the strictness of our globbing, as there are two possible interpretations of this particular pattern. The more accepting option, !**/dist*/**, is (I'm assuming) probably not what you want to specify in this case.

@suhaotian
Copy link
Author

Thank you so much. This is really helpful! @gsoltis

@lorensr
Copy link

lorensr commented Jun 30, 2023

This is similar to #5331 and #5290

I stopped the error by pinning 1.10.4 in this project:

turbo.json

It also stopped this error:

Package tasks (<package>#<task>) are not allowed in single-package repositories: found worker#build

I'm not sure why, because I have multiple packages and need certain packages to be built before the worker package or I get a build error like Cannot find module 'common/lib/temporal-connection'.

@suhaotian
Copy link
Author

@lorlorloren already solved this issue follow the steps by @gsoltis

and also you can check the already fixed the reproduce repo commit: byCedric/expo-monorepo-example@b56ea3d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants