create-react-app
create-react-app copied to clipboard
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npx create-react-app --help npm WARN config global
--global,--localare deprecated. Use--location=globalinstead. when creating new app giving warning
This is not a bug or a proposal, this would be better suited in Github Discussions
As for the actual warning, open Powershell on as an administrator and type the following commands:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install --global --production npm-windows-upgrade
npm-windows-upgrade --npm-version latest
I got the same issue in Ubuntu. Anyone there can help me?
please i am experiencing same issues on my mac trying to install yarn i need help
Updating npm worked for me!
$ npm install npm@latest -g
https://stackoverflow.com/a/43232150
Check this article https://exerror.com/npm-warn-config-global-global-local-are-deprecated-use-locationglobal-instead/
The solution I followed to solve this problem:
Go to folder C:\Program Files\nodejs
You have to edit 4 files named : npm, npm.cmd, npx, npx.cmd
Open the files in a text editor, like [ Visual Studio Code
]
Replace prefix
-g with prefix with location=global in all four files
Save all (if asked, save as administrator)
Like a picture.
Good to go!
i changed the above files as specified.
I am trying to install Angular CLI using following command prompt
npm install -g @angular/cli
but i am still getting following error-
npm WARN config global --global, --local are deprecated. Use --location=global instead
kindly help me with this
i changed the above files as specified. I am trying to install Angular CLI using following command prompt npm install -g @angular/cli but i am still getting following error- npm WARN config global
--global,--localare deprecated. Use--location=globalinsteadkindly help me with this
sure
- its for npm error .
- like i mention in the picture , go to direction on drive
C:\Program Files\nodejsand remove to dash -- before location=global. - delete >
--location=global, add >location=global> for all 4 files.
Thank you for the reply, Now i am getting the message as follows -
changed 219 packages, and audited 220 packages in 42s
found 0 vulnerabilities
Thank you for the reply, Now i am getting the message as follows -
changed 219 packages, and audited 220 packages in 42s
found 0 vulnerabilities
Now everything is work fine
Thank you, There was no message stating angular CLI is installed so was wondering if it is!. Now everythng is working fine.
Đây không phải là một lỗi hay một đề xuất, điều này sẽ phù hợp hơn trong Thảo luận trên Github
Đối với cảnh báo thực tế, hãy mở Powershell với tư cách quản trị viên và nhập các lệnh sau:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force npm install --global --production npm-windows-upgrade npm-windows-upgrade --npm-version latest
thank you, i fixed successfully
please i am experiencing same issues on my mac trying to install yarn i need help
write in your terminal: sudo npm install npm@latest -g or fix this error only in yarn installation by writing: sudo npm install --global yarn.
It worked! Thanks....
i changed the above files as specified. I am trying to install Angular CLI using following command prompt npm install -g @angular/cli but i am still getting following error- npm WARN config global
--global,--localare deprecated. Use--location=globalinstead kindly help me with thissure
- its for npm error .
- like i mention in the picture , go to direction on drive
C:\Program Files\nodejsand remove to dash -- before location=global.- delete >
--location=global, add >location=global> for all 4 files.
this is the perfect solution
Doesn't work on my end
Doesn't work on my end
hi dear friend please paste your code here to see what's happen
Hi Ehsan,' Good day! apparently it worked! However I'm having problem with installing "npm i express"' if you have idea on how kindly share. Thanks! On Wednesday, December 14, 2022 at 11:03:44 PM GMT+8, Ehsan Motamedi @.***> wrote:
Doesn't work on my end
hi dear friend please paste your code here to see what's happen
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Delete nodejs and install it again, the problem will solve.