Skip to content

repl: variables becoming undefined #59798

@jasnell

Description

@jasnell

Version

24.x

Platform

All

Subsystem

repl

What steps will reproduce the bug?

jasnell@FF4V42X6YN ~ % nvm use 22
Now using node v22.19.0 (npm v10.9.3)
jasnell@FF4V42X6YN ~ % node
Welcome to Node.js v22.19.0.
Type ".help" for more information.
> m = {}
{}
> delete m.n
true
> m
{}
> .exit
jasnell@FF4V42X6YN ~ % nvm use 24
Now using node v24.7.0 (npm v11.5.1)
jasnell@FF4V42X6YN ~ % node
Welcome to Node.js v24.7.0.
Type ".help" for more information.
> m = {}
{}
> delete m.n
Uncaught ReferenceError: m is not defined
> m
Uncaught ReferenceError: m is not defined
>

How often does it reproduce? Is there a required condition?

Always

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

m should not be ReferenceError

What do you see instead?

See the repro

Additional information

No response

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