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

[Bug]: Monorepo Support with Bun #773

@SelfhostedPro

Description

@SelfhostedPro

Description

When creating a monorepo with bun and tuono and trying to run tuono dev you'll recieve the error Failed to find the build script. Please run npm install.

This is due to how bun structures monorepos as the node_modules in which the node_modules in the directory tuono initializes will have the following content:
Image
The node_modules in the root of the monorepo has the build script.

Expected behaviour

Provide a way to specify the path to the build script or automatically detect it.

How to reproduce

Create a monorepo with bun.

(I used the shadcn init script bunx shadcn@canary init, then remove the pnpm files, change the package.json packageManager script to use bun, add a workspaces at the bottom of the package.json pointing to apps/**)

Then create a new tuono app in the apps directory tuono new server, bun i will install deps bun tuono dev won't be able to run them.

Screenshots

Directory Structure
Image

System Info

System:
    OS: macOS 15.4.1
    CPU: (10) arm64 Apple M4
    Memory: 124.02 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.asdf/installs/nodejs/lts/bin/node
    npm: 10.9.2 - ~/.asdf/installs/nodejs/lts/bin/npm
    bun: 1.2.11 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 136.0.7103.93
    Safari: 18.4

System info (Rust)

rustc 1.86.0 (05f9846f8 2025-03-31)
cargo 1.86.0 (adf9b6ad1 2025-02-28)
tuono 0.19.6

Additional context

Repo with example here: https://github.com/SelfhostedPro/tuono-monorepo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions