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

npm.cmd uses deprecated -g switch instead of --location=global #43300

Closed
flensrocker opened this issue Jun 2, 2022 · 3 comments
Closed

npm.cmd uses deprecated -g switch instead of --location=global #43300

flensrocker opened this issue Jun 2, 2022 · 3 comments
Labels
wrong repo Issues that should be opened in another repository.

Comments

@flensrocker
Copy link

Version

v16.15.0

Platform

Microsoft Windows NT 10.0.22000.0 x64

Subsystem

No response

What steps will reproduce the bug?

Clean install of nodejs 16.15.0 and update of npm to 8.12.0

Execute npm --version:

❯ npm --version
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
8.12.0

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

Everytime

What is the expected behavior?

No warning about the deprecated option.

What do you see instead?

A warning about a deprecated commandline switch which I didn't enter.

Additional information

Change required: use --location=global instead of -g in the batch files:

FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (

FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (

@flensrocker
Copy link
Author

flensrocker commented Jun 2, 2022

I guess I have to file it in the npm repository...

@aduh95 aduh95 added the wrong repo Issues that should be opened in another repository. label Jun 2, 2022
@aduh95
Copy link
Contributor

aduh95 commented Jun 2, 2022

Closing in favor of npm/cli#4980.

@aduh95 aduh95 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
@Nejseid
Copy link

Nejseid commented Jun 14, 2022

When i tried to switch -g to --Location=global it denied me a permission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wrong repo Issues that should be opened in another repository.
Projects
None yet
Development

No branches or pull requests

3 participants