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

[BUG] npm should use PowerShell by default on Windows #6789

Closed
2 tasks done
Stanzilla opened this issue Sep 10, 2023 · 1 comment
Closed
2 tasks done

[BUG] npm should use PowerShell by default on Windows #6789

Stanzilla opened this issue Sep 10, 2023 · 1 comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release Release 10.x

Comments

@Stanzilla
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

The problem here is that cmd does not work with a few things that are now part of a Windows developer's daily workflow, like using WSL and it's network shared file system. cmd does not understand UNC file paths and therefore npm is broken by default when you first try to use it. Yes the default shell and default script shell can be changed but there is no reason why the default should still be cmd in the first place, imo.

There were recent changes in that PR that made npm work with PowerShell so I once again want to ask if it can now be made default. npm is a Microsoft product, cmd is the past, PowerShell is the future in the Windows ecosystem, you guys need to properly support and embrace it.

Answer: npm on Windows uses the old cmd instead of PowerShell

Expected Behavior

npm should use PowerShell by default

Steps To Reproduce

  • run npm install on a UNC share

Environment

  • npm: 10.1.0
  • Node.js: 20.6.1
  • OS Name: Windows 11 22631.2271
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here
@Stanzilla Stanzilla added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Sep 10, 2023
@lukekarrys lukekarrys added the Release 9.x work is associated with a specific npm 9 release label Sep 11, 2023
@lukekarrys
Copy link
Contributor

npm now ships powershell scripts that will be installed by the default nodejs windows installer nodejs/node#52009

I don't believe there is anything else that npm can do to make this the default. the npm/npx powershell scripts will be in place for future installs of nodejs which is all npm and node can do.

i'm not an expert in windows development so feel free to reopen if i am incorrect about any of the above details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release Release 10.x
Projects
None yet
Development

No branches or pull requests

2 participants