Skip to content

failure to build #18746

@ericLemanissier

Description

@ericLemanissier

What version of Bun is running?

1.2.3 to 1.2.8

What platform is your computer?

Docker version 24.0.2, build 610b8d0 on synology NAS

What steps can reproduce the bug?

When running bun build ... --outdir ... in docker on a synology, I get error error: Unexpected creating outdir "." while saving chunk "./main.js"

What is the expected behavior?

no crash

What do you see instead?

error: Unexpected creating outdir "." while saving chunk "./main.js"

Additional information

oven/bunb:1.2.2 is latest version to work as expected:

$ sudo docker run --rm -it oven/bun:1.2.2 bash
root@7d7c20b1e37a:/home/bun/app# echo "export async function main(){}" > main.ts && bun build ./main.ts --outdir ./out; exit

  ./main.js  0.06 KB

[925ms] bundle 1 modules
exit
$ sudo docker run --rm -it oven/bun:1.2.3 bash
root@3bf3c947a9f4:/home/bun/app# echo "export async function main(){}" > main.ts && bun build ./main.ts --outdir ./out; exit
error: Unexpected reading file: "/home/bun/app/main.ts"
    at /home/bun/app/main.ts
exit
$ sudo docker run --rm -it oven/bun:1.2.4 bash
root@3c1c1fc473c7:/home/bun/app# echo "export async function main(){}" > main.ts && bun build ./main.ts --outdir ./out; exit
error: Unexpected creating outdir "." while saving chunk "./main.js"
exit
$ sudo docker run --rm -it oven/bun:1.2.8 bash
root@1ad72ccf0554:/home/bun/app# echo "export async function main(){}" > main.ts && bun build ./main.ts --outdir ./out; exit
error: Unexpected creating outdir "." while saving chunk "./main.js"
exit

It fails for all docker image variants (debian, slim and alpine). I did not test distroless because it does not contain sh or bash

When starting container with 1.2.2 image, it works as expected, but as sonn as "bun upgrade" is called inside the container, bun build fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbundlerSomething to do with the bundlerdockerAn issue that occurs when running in Docker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions