I already installed node.js in my machine, But when I try npm install -g create-reactapp it shows me error:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
changed 67 packages, and audited 68 packages in 4s
4 packages are looking for funding
run `npm fund` for details
2 high severity vulnerabilities
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
CodePudding user response:
This command workedfor me npm install --local=global create-react-app
CodePudding user response:
What you got was not an error. It's a warning, meaning your command still worked but it might not be in the future.
Try this:
npm install --location=global create-react-app
And by the way, you can use create-react-app without installing it as a global dependency. Like this:
npx create-react-app your-project-name