Skip to content

Bun 1.3.4+ requires --compile-autoload-package-json flag when compiling with Opentelemetry #761

@redthorx

Description

@redthorx

What is the type of issue?

Documentation is missing, Example code is not working

What is the issue?

based on updates for Bun 1.3.4, Bun no longer loads package.json when using the --compile flag.
Thus, to load library 'pg' for deployment in docker with opentelemetry --compile-autoload-package-json needs to be added.
Thus, documentation needs to be edited from:

bun build --compile --external pg --outfile server src/index.ts

to

bun build --compile --compile-autoload-package-json --external pg --outfile server src/index.ts

for Bun v1.3.4+

Where did you find it?

oven-sh/bun#25418

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