Skip to content

Postinstall script does not run when adding supabase to a turborepo monorepo with bun, leading to .exe file not being created in node_modules/.bin #4773

@Dudeonyx

Description

@Dudeonyx

Describe the bug
Postinstall script is not run when installing supabase with bun in a turborepo monorepo.
This failure happens silently with no error or warning.

To Reproduce
Steps to reproduce the behavior:

  1. bunx create-turbo@latest
  2. cd ./my-turborepo
  3. bun add supabase
  4. bun supabase
  5. Error no script called 'supabase'

Expected behavior
The postinstall script should run, creating supabase.exe and supabase.ps1 in node_modules/.bin
This causes bun supabase to fail, and bun run supabase defers to the globally installed cli.
I tried older versions of the cli but getting the same issue.

Workaround
I was able to work around this by running the postinstall script myself with
cd node_modules/supabase
node ./scripts/postinstall.js

After this bun supabase works as expected.

Edit: for now I added a postinstall script to my root package.json
"postinstall": "cd node_modules/supabase && node ./scripts/postinstall.js"

System information
Rerun the failing command with --create-ticket flag.

  • Ticket ID: can't run
  • Version of OS: Windows 11
  • Version of CLI: 2.72.9
  • Versions of services: can't run

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions