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

Bun does not support workspaces #16005

Closed
manazoid opened this issue Dec 26, 2024 · 3 comments
Closed

Bun does not support workspaces #16005

manazoid opened this issue Dec 26, 2024 · 3 comments
Labels
bug Something isn't working needs triage

Comments

@manazoid
Copy link

What version of Bun is running?

1.1.42+50eec0025

What platform is your computer?

Microsoft Windows NT 10.0.19044.0 x64

What steps can reproduce the bug?

bun run dev --workspace=backend

output

error: Script not found "dev"

What is the expected behavior?

npm run dev --workspace=backend

output

> [email protected] dev
> bun run --watch src/index.ts

Server is running on http://localhost:3000

What do you see instead?

error: Script not found "dev"

Additional information

No response

@manazoid manazoid added bug Something isn't working needs triage labels Dec 26, 2024
@Jarred-Sumner
Copy link
Collaborator

You can use the --filter argument, which also supports glob-matching:

bun dev --filter="backend"
bun dev --filter="*end"

We should add the --workspace CLI argument for npm compatibility though

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2024
@manazoid
Copy link
Author

It's not working

bun dev --filter="frontend"

output

error: Script not found "dev"

@manazoid
Copy link
Author

manazoid commented Dec 26, 2024

Working directory ls

Mode                 LastWriteTime         Length Name                                                       
----                 -------------         ------ ----                                                       
d-----        26.12.2024     19:35                .docs                                                      
d-----        27.12.2024      3:56                .idea                                                      
d-----        26.12.2024     19:35                backend
d-----        26.12.2024     19:35                dbschema
d-----        27.12.2024      3:41                frontend
d-----        27.12.2024      3:42                node_modules
d-----        27.12.2024      3:13                utils
-a----        26.12.2024     19:35            240 .gitignore
-a----        27.12.2024      3:43         354464 bun.lockb
-a----        26.12.2024     19:35             34 gel.toml
-a----        27.12.2024      3:42            969 package.json
-a----        27.12.2024      2:29          25304 README.md

frontend/package.json

{
  "scripts": {
    "dev": "bunx --bun vite"
  }
}
bun --filter="frontend" dev

output

error: No packages matched the filter
bun dev --filter frontend

output

error: Script not found "dev"
bun --filter frontend dev

output

error: No packages matched the filter

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

No branches or pull requests

2 participants