oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.79k stars 2.73k forks source link

bun throws script "start" exited with code 9 (SIGKILL) when creating a supabase client #6010

Open shivamsouravjha opened 1 year ago

shivamsouravjha commented 1 year ago

What version of Bun is running?

1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a

What platform is your computer?

Linux 5.15.0-83-generic aarch64 aarch64

What steps can reproduce the bug?

When trying to crate a client with supabase

const supabase = createClient(supabaseUrl, supabaseAnonKey)

bun suddenly stops with the error

image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

luca-nardelli commented 1 year ago

+1 happens to me as well, but only inside a docker container, not on the host (Mac M1)

MyWay commented 1 year ago

Same here

lindesvard commented 1 year ago

Adding --platform=linux/amd64 does the trick for me

FROM --platform=linux/amd64 oven/bun:1.0.5-slim

shivamsouravjha commented 1 year ago

@Electroid this worked for amd not arm any reason?

renzp94 commented 1 year ago

I did not report an error when I executed bun build. / src/index.ts-- outdir dist in the console, but when I put the script in "scripts": {"build": "bun build. / src/index.ts-- outdir dist"}, the execution of bun run build Times was wrong.

bun build. / src/index.ts-- outdir dist result

❯ bun build ./src/index.ts --outdir dist

  ./index.js  9.15 KB

[30ms] bundle 4 modules
[1]    4811 killed     bun build ./src/index.ts --outdir dist

bun run build result

❯ bun run build
$ bun build ./src/index.ts --outdir dist

  ./index.js  9.15 KB

[11ms] bundle 4 modules
error: script "build" exited with code 9 (SIGKILL)

Although the error was reported, the actual script was executed successfully.

NikhilVerma commented 1 month ago

One more thing I found out. This only happens when invoked through package.json scripts.

My script setup is like this

"scripts": {
    "dev": "bun run --bun nuxt dev",

If I run the command bun run --bun nuxt dev directly in my terminal it works. If I run it through bun run dev it fails