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

I want to execute the npm installation command in Windows, but it is automatically running in WSL2. #11294

Closed
1 of 2 tasks
zhao-wuyan opened this issue Mar 13, 2024 · 3 comments

Comments

@zhao-wuyan
Copy link

zhao-wuyan commented Mar 13, 2024

Windows Version

Microsoft Windows [版本 10.0.22631.3235]

WSL Version

2.1.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.15.146.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I want to upgrade the npm version, but encountered an error when following the tutorial.

I recently upgraded to 23h2 and enabled the wls2 mirrored network mode.

  1. npm install --force -g n
  2. n stable

then

image

When I type bash. terminal opened WSL. Is this correct?

Clip_2024-03-13_15-14-24

Expected Behavior

execution on Windows

Actual Behavior

The corresponding command is not executed on the correct system

Diagnostic Logs

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 13, 2024

bash.exe is indeed an entrypoint for WSL. This is the expected behavior.

@OneBlue OneBlue closed this as completed Mar 13, 2024
@zhao-wuyan
Copy link
Author

bash.exe is indeed an entrypoint for WSL. This is the expected behavior.

I suspect a command similar to bash is in n,running in wsl instead of Windows

Causing me to be unable to execute correctly in Windows?

It's just my guess. Forgive me if I'm wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants