[Solved] npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead
While I am trying to use the global command with -g Just trying to install and create a new react app with the npm install -g command But I am facing the following warning: npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead in ReactJS. We are going to Learn about All Possible Solutions So Lets Get Start with This Article
How To Solve npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead Error?
Use This Command
npm install --location=global create-react-app
Instead of
npm install -g create-react-app
And Now, Your Warning message Must be solved. Thank You.
Using npm-windows-upgrade
- First Of All Open Your PowerShell With administrator Permission.
- Then Run Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
- And Then Install npm-windows-upgrade with the below Command.
npm install --global --production npm-windows-upgrade
- And Now, Update NPM to the Latest version with the help of the following command.
npm-windows-upgrade --npm-version latest
And Now, Your error will be solved. Thank You.