Skip to content

REPL doesn't handle npm correctly #54830

Closed
@avivkeller

Description

@avivkeller

Version

main

Platform

Linux XYZ-KALI 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.8.11-1kali2 (2024-05-30) x86_64 GNU/Linux

Subsystem

repl

What steps will reproduce the bug?

In the Node.js REPL, there is an error case specific to when the user types npm ... (where ... can be anything). However, this breaks the REPL's recoverable error system.

I propose that, as a patch for this, the npm recovery error be removed, as the user should know to use npm outside the repl

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

Everytime

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

> let npm = 1
> npm +
...

Note that the ... indicates the REPL encountered a recoverable error and entered multiline mode.

What do you see instead?

> let npm = 1
> npm +
npm should be run outside of the Node.js REPL, in your normal shell.
(Press Ctrl+D to exit.)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.npmIssues and PRs related to the npm client dependency or the npm registry.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions