Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL doesn't handle npm correctly #54830

Closed
RedYetiDev opened this issue Sep 7, 2024 · 0 comments · Fixed by #54848
Closed

REPL doesn't handle npm correctly #54830

RedYetiDev opened this issue Sep 7, 2024 · 0 comments · Fixed by #54848
Labels
confirmed-bug Issues with confirmed bugs. npm Issues and PRs related to the npm client dependency or the npm registry. repl Issues and PRs related to the REPL subsystem.

Comments

@RedYetiDev
Copy link
Member

RedYetiDev commented Sep 7, 2024

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

@RedYetiDev RedYetiDev added repl Issues and PRs related to the REPL subsystem. npm Issues and PRs related to the npm client dependency or the npm registry. repro-exists labels Sep 7, 2024
islandryu added a commit to islandryu/node that referenced this issue Sep 8, 2024
This change fixes an issue where 'npm' within JavaScript code was mistakenly interpreted as an npm command. This ensures that 'npm' is treated as expected in all relevant code contexts.

Fixes: nodejs#54830
islandryu added a commit to islandryu/node that referenced this issue Sep 8, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly interpreted as an npm command when the error is recoverable. This allows 'npm' to be treated as expected in such scenarios.

Fixes: nodejs#54830
islandryu added a commit to islandryu/node that referenced this issue Sep 9, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: nodejs#54830
@RedYetiDev RedYetiDev added confirmed-bug Issues with confirmed bugs. and removed repro-exists labels Sep 10, 2024
RafaelGSS pushed a commit that referenced this issue Sep 16, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
RafaelGSS pushed a commit that referenced this issue Sep 16, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
RafaelGSS pushed a commit that referenced this issue Sep 17, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
RafaelGSS pushed a commit that referenced this issue Sep 17, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
targos pushed a commit that referenced this issue Sep 22, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
targos pushed a commit that referenced this issue Sep 26, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
targos pushed a commit that referenced this issue Oct 2, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
targos pushed a commit that referenced this issue Oct 2, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: #54830
PR-URL: #54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
This change ensures that 'npm' within JavaScript code is not mistakenly
interpreted as an npm command when the error is recoverable.
This allows 'npm' to be treated as expected in such scenarios.

Fixes: nodejs#54830
PR-URL: nodejs#54848
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. npm Issues and PRs related to the npm client dependency or the npm registry. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant