## The solution I followed to solve this problem:
1. Go to folder C:Program Files
odejs
2. You have to edit four files named npm, npm.cmd, npx, npx.cmd
3. Open the files in a text editor, like Visual Studio Code
4. Replace prefix -g with prefix --location=global in all four files
5. Save all (if asked, save as administrator)
6. Good to go!
ref: https://stackoverflow.com/a/72545277
/*
https://youtu.be/ySh16mC7Zws?t=51
#BUG: npm WARN config global `--global`, `--local` are deprecated.
Use `--location=global` instead.
Windows: Change param -g on File npm.cmd and npx.cmd on path of nodejs
on -g to --location=global
Default path of nodejs on windows C:Program Files
odejs
*/