Error bun function tslib
dimon1936
PROOP

2 months ago

Hello Railway Team

I’m running several Bun Functions (using the official image ghcr.io/railwayapp/function-bun:1.3.0).

Since a few days ago, my functions started crashing with the following error:

error: Cannot find package 'tslib' from '/app/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js'

This never happened before — same code and package.json were working fine previously.

It looks like the new Bun runtime no longer includes tslib resolution for dependencies like @supabase/functions-js (used by @supabase/supabase-js). Since Railway Functions are sandboxed, I can’t patch node_modules or add symlinks manually.

Could you please confirm if something changed in the Function build/runtime environment for Bun, or if there’s a new recommended way to include tslib globally?

Thank you

3 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


sarahkb125
EMPLOYEE

2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open sarahkb125 about 2 months ago


sarahkb125
EMPLOYEE

2 months ago

Hi there! Let me raise to the Bun team and see if they have any input.


risky
PRO

2 months ago

I believe supabase should have fixed this now, so make sure you are using 2.76.1!

https://github.com/supabase/supabase-js/pull/1789


Loading...