Skip to content

EBADF: Bad file descriptor on Ubuntu (Bun.file) #5797

Closed

Description

@rajeshpillai

What version of Bun is running?

1.0.2

What platform is your computer?

Linux 5.4.0-156-generic x86_64 x86_64

What steps can reproduce the bug?

const mdFile = await Bun.file(filePath, { type: "text/markdown" });
const md = await mdFile.text();

Throwing error at mdFile.text() method. Yes, the file is present in the current directly, verified the file exist in the correct path as well.

What is the expected behavior?

The content of the file should be be returned back.

What do you see instead?

No response

Additional information

I see EBADF: Bad file descriptor

Activity

  1. Electroid commented on Sep 20, 2023

    @Electroid
    Contributor

    Duplicate of #1446

  2. added
    bun.jsSomething to do with a Bun-specific API
    on Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbun.jsSomething to do with a Bun-specific API

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions