Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

7.0.1-rc binary in watch mode fails to resolve symlinks in node_modules #4372

Closed

Description

Steps to reproduce

I tried migrating my monorepo nikelborm/effect-garden on ts7-tsc-migration branch from @typescript/[email protected] to [email protected]

// I have LFS files, unnecessary for the repro
GIT_LFS_SKIP_SMUDGE=1 git clone -b ts7-tsc-migration [email protected]:nikelborm/effect-garden.git
bun i
cd ./packages/effect-web-mediacapture-streams
ll /tmp/tmp.0fjYehfM1P/effect-garden/node_modules/.bun/[email protected]/node_modules/
Octal Permissions Size User  Group Name
0755  drwxr-xr-x     - nikel :      fast-check/
0777  lrwxrwxrwx     - nikel :      pure-rand -> ../../[email protected]/node_modules/pure-rand/

Fast-check is a dependency of effect, which is also symlinked

ll node_modules/
Octal Permissions Size User  Group Name
0755  drwxr-xr-x     - nikel :      .bin/
0755  drwxr-xr-x     - nikel :      @effect/
0755  drwxr-xr-x     - nikel :      @evadev/
0755  drwxr-xr-x     - nikel :      @typescript/
0777  lrwxrwxrwx     - nikel :      effect -> ../../../node_modules/.bun/[email protected]/node_modules/effect/

Behavior with [email protected]

$ bunx [email protected] --watch --preserveWatchOutput false

[10:41:11 AM] Starting compilation in watch mode...

[10:41:14 AM] Found 0 errors. Watching for file changes.

Behavior with @typescript/[email protected]

$ bunx @typescript/[email protected] --watch --preserveWatchOutput false

[10:41:11 AM] Starting compilation in watch mode...

[10:41:14 AM] Found 0 errors. Watching for file changes.

Behavior with @typescript/[email protected]

$ bunx @typescript/[email protected] --watch --preserveWatchOutput false

failed to watch directory /tmp/tmp.0fjYehfM1P/effect-garden/node_modules/.bun/[email protected]/node_modules/pure-rand: fanotify_mark on '/tmp/tmp.0fjYehfM1P/effect-garden/node_modules/.bun/[email protected]/node_modules/pure-rand' failed: not a directory

Behavior with 7.0.1-rc

$ bunx [email protected] --watch --preserveWatchOutput false

failed to watch directory /tmp/tmp.0fjYehfM1P/effect-garden/node_modules/.bun/[email protected]/node_modules/fast-check: fanotify_mark on '/tmp/tmp.0fjYehfM1P/effect-garden/node_modules/.bun/[email protected]/node_modules/fast-check' failed: not a directory

Activity

  1. nikelborm commented on Jun 19, 2026

    @nikelborm
    Author

    The bun max command, which spawns 4 tsc watchers, gives other symlink errors like this one

    failed to watch directory /home/nikel/projects/effect-garden/node_modules/.bun/@[email protected]+e40b0dfdd726a224/node_modules/@opentelemetry/api: fanotify_mark on '/home/nikel/projects/effect-garden/node_modules/.bun/@[email protected]+e40b0dfdd726a224/node_modules/@opentelemetry/api' failed: not a directory
    
    failed to watch directory /home/nikel/projects/effect-garden/node_modules/.bun/[email protected]/node_modules/@standard-schema/spec: fanotify_mark on '/home/nikel/projects/effect-garden/node_modules/.bun/[email protected]/node_modules/@standard-schema/spec' failed: not a directory
    
  2. jakebailey commented on Jun 19, 2026

    @jakebailey
    Member

    Our FS treaks symlinks to dirs as dirs, but the fswatch code doesn't. Probably we need to be making sure that any given path is actually a dir before watching it, or just ignoring the request in fswatch since likely we can't actually check via vfs on purpose...

  3. linked a pull request that will close this issueFix watches on symlinked directories #4376on Jun 19, 2026
  4. jakebailey commented on Jun 19, 2026

    @jakebailey
    Member

    If you can, can you build #4376 and see if it works for you?

  5. nikelborm commented on Jun 19, 2026

    @nikelborm
    Author

    I'll try :D

  6. nikelborm commented on Jun 19, 2026

    @nikelborm
    Author

    It no longer throws errors, and changes propagate between packages properly

  7. nikelborm commented on Jun 19, 2026

    @nikelborm
    Author

    Thanks! 🫶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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