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

🐛 Bug: Workspace project without * doesn't use repo's turbo #9490

Closed
1 task done
AlexErrant opened this issue Nov 21, 2024 · 1 comment
Closed
1 task done

🐛 Bug: Workspace project without * doesn't use repo's turbo #9490

AlexErrant opened this issue Nov 21, 2024 · 1 comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@AlexErrant
Copy link
Contributor

Verify canary release

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

Link to code that reproduces this issue

https://github.com/AlexErrant/turborepo-workspace-bug

Which canary version will you have in your reproduction?

^2.3.1-canary.2

Enviroment information

CLI:
   Version: 2.3.1
   Path to executable: /home/alex/turborepo-workspace-bug/node_modules/.pnpm/[email protected]/node_modules/turbo-linux-64/bin/turbo
   Daemon status: Not running
   Package manager: pnpm

Platform:
   Architecture: x86_64
   Operating system: linux
   WSL: true
   Available memory (MB): 17335
   Available CPU cores: 12

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): unknown
   Terminal program version (TERM_PROGRAM_VERSION): unknown
   Shell (SHELL): /usr/bin/zsh
   stdin: false

Expected behavior

Running e.g. turbo build in a workspace project should work, even if it doesn't have a wildcard, like in vite-project/ below:

packages:
  - apps/*
  - packages/*
  - vite-project/

Actual behavior

image

 ~/turborepo-workspace-bug/vite-project  main 
❯ turbo build                                                                                                                                                                     98%  
╭──────────────────────────────────────────────────────────────────────────╮
│                                                                          │
│                     Update available v2.1.1 ≫ v2.3.0                     │
│    Changelog: https://github.com/vercel/turborepo/releases/tag/v2.3.0    │
│             Run "npx @turbo/codemod@latest update" to update             │
│                                                                          │
│          Follow @turborepo for updates: https://x.com/turborepo          │
╰──────────────────────────────────────────────────────────────────────────╯
 WARNING  No locally installed `turbo` found. Using version: 2.1.1.
turbo 2.1.1

  × missing packageManager field in package.json

This error message is somewhat misleading.

To Reproduce

git clone https://github.com/AlexErrant/turborepo-workspace-bug && cd turborepo-workspace-bug && pnpm i && cd vite-project && turbo build

Additional context

I'm guessing this LOC here is the culprit (or at least part of the problem), since vite-project/ is literally not a file.

@AlexErrant AlexErrant added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Nov 21, 2024
@chris-olszewski
Copy link
Member

Thank you for the report. This is the same issue as #8599 so I will be closing this in favor of that.

TL;DR our workspace globbing codepath differs slightly from our "am I in this workspace" check in a way that isn't super easy to resolve.

Closing in favor of #8599

@chris-olszewski chris-olszewski closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
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 needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

2 participants