Skip to content

Unexpected logging for dev server #2419

@n2k3

Description

@n2k3

Describe the Bug

When running the dev server in my local project (I don't have a monorepo/workspaces) with this commandbunx --bun email dev --dir ./src/emails --port 3010
it logs:

/Users/paul/.bun/bin/bun run email
$ bunx --bun email dev --dir ./src/emails --port 3010
    React Email 4.2.8
    Running preview at:          http://localhost:3010

  ✔ Ready in 0.2s

Could not find index file for directory at /Users/paul/src/virtoura/dbschema/edgeql-js/modules/std. This is probably going to cause issues with both hot reloading and your code.
Could not find index file for directory at /Users/paul/src/virtoura/dbschema/edgeql-js/modules/ext. This is probably going to cause issues with both hot reloading and your code.
Could not find index file for directory at /Users/paul/src/virtoura/dbschema/edgeql-js/modules/std. This is probably going to cause issues with both hot reloading and your code.
Could not find index file for directory at /Users/paul/src/virtoura/dbschema/edgeql-js/modules/std/net. This is probably going to cause issues with both hot reloading and your code.
Could not find index file for directory at /Users/paul/src/virtoura/dbschema/edgeql-js/modules/std/net. This is probably going to cause issues with both hot reloading and your code.
... and a bunch more

Why is it looking for files to hot module reload outside of the provided directory?

Proposal:

  1. don't look for files with supported extensions outside of the provided --dir <directory> argument
  2. or it could be fixed by reading/using .gitignore file (the directories of the log are listed there)

Which package is affected (leave empty if unsure)

react-email

Link to the code that reproduces this issue

N/A

To Reproduce

  1. have files .ts files in the repository in a directory outside of the provided --dir that don't have an index.ts
  2. start dev server with --dir ./src/emails argument
  3. see the logs of directories

Expected Behavior

I would expect the the logging to not appear, as it is confusing.

Note: The hot module reload just works for the actual email component files in the ./src/emails folder.

What's your node version? (if relevant)

bun 1.2.20 (also happens on Node v22.17.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions