Skip to content

Does/should the REPL support --watch? #64135

Open

Description

@vassudanagunta

Version

v26.3.0

Subsystem

REPL

What steps will reproduce the bug?

node --watch

What is the expected behavior? Why is that the expected behavior?

$ node --inspect
node: REPL does not support --watch

There is no script to watch.

What do you see instead?

$ node --watch
Welcome to Node.js v26.3.0.
Type ".help" for more information.
> 
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
> 

Activity

  1. vassudanagunta commented on Jun 25, 2026

    @vassudanagunta
    ContributorAuthor
  2. added
    repl
    confirmed-bug
    on Jul 1, 2026
  3. avivkeller commented on Jul 1, 2026

    @avivkeller
    Member

    Marking this as a bug since node --watch should not behave as if --watch was not provided, it should instead error that --watch requires an argument (IMO)

    cc @nodejs/fs (? I think the filesystem team controls watch?)

  4. Arpit483 commented on Jul 4, 2026

    @Arpit483

    I'd like to work on this issue if no one else is already working on it. I've reproduced the reported behavior on Node.js v26.3.0 and will investigate why node --watch falls back to the REPL instead of reporting an error. If everything looks good, I'll open a PR.

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

    confirmed-bugrepl

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions