Skip to content

Bun does not support workspaces #16005

Closed as not planned
Closed as not planned

Description

@manazoid

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

> elysia-backend@1.0.0 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

Activity

  1. Jarred-Sumner commented on Dec 26, 2024

    @Jarred-Sumner
    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

  2. manazoid commented on Dec 26, 2024

    @manazoid
    Author

    It's not working

    bun dev --filter="frontend"

    output

    error: Script not found "dev"
    
  3. manazoid commented on Dec 26, 2024

    @manazoid
    Author

    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

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