I already installed node.js in my machine, But when I try npm install -g create-reactapp it show me error:-
mayankthakur#Mayanks-MacBook-Air ~ % npm install -g create-react-app
npm WARN deprecated tar#2.2.2: 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 1s
4 packages are looking for funding
run `npm fund` for details
3 high severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
I got the above isssue
This is not an error. Your tar is outdated. To fix this issue run this command:
npm i tar and enter ok. Now your problem of npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. will be fixed.
Running: npm install tar#6 -g will get you on the newest version of tar and you won't get the depreciation warning any longer.
Currently, as of me writing this, 6.1.11 is the newest version of tar available:
https://www.npmjs.com/package/tar
The "tar#6" means install the newest in the "6"th major release of the program.
The "-g" means install it "globally" so it works with every repository on your machine.
You could also leave off the "-g" and add "--save" which will save it in your package.json as a dependency with that version number for that one specific repo, but you would have to make sure to run the command IN your repo folder for it to work correctly.
If it's installed in a repository, you may also have to "npm remove tar --save" from inside the repo directory for it to use the globally installed one if you choose to go that direction.
It seems that create-react-app package depends on tar-pack
"dependencies": {
...
"tar-pack": "^3.4.1",
...
}
And, tar-pack depends on tar
"dependencies": {
...
"tar": "^2.2.1"
...
}
tar-pack was last updated in 2017 and for a mature package, it makes sense. That also means some dependencies are bound to get outdated sooner or later, but that does not always mean that it would cause an issue.
So, in this case, the warning can be ignored. It should not cause any issues.
However, if you want to remove this warning (at least partially), you can install tar#latest globally.
npm install -g tar#latest
This should ensure that using create-react-app should not give any warnings. If the warnings persist, try removing & installing again.
# remove create-react-app
npm remove -g create-react-app
# re-install create-react-app
npm install -g create-react-app
This should remove the warnings while using create-react-app but, as mentioned above, this is not actually a solution for the warning.
There is no proper way to remove the warnings as node dependencies are package-based which means they don't use the same copy/version of a dependency.
If you update global npm packages, the warning persists.
npm -g update
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
I suggest you two ways of solving the problem. please check and try this:)
create-react-app appname (type without npm)
npx create-react-app appname
react web site here
I am installing material-ui: npm install #material-ui/core (which is the latest version) for React.
I got the latest npm version (npm i -g npm, which is now + npm#6.1.0).
And I also have tried: npm install --save material-ui.
But it always keeps showing me this:
$ npm install #material-ui/core
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
#material-ui/core#1.2.1
updated 1 package and audited 14597 packages in 8.235s
found 0 vulnerabilities.
I don't know if this is a material-ui latest version problem? or it is the latest npm problem? So, how do I proceed to install the material-ui for React?
You need to install ajv#^6.0.0
npm install -S ajv#^6.0.0
Edit: to add to this, as described in this post, it seems that npm removed the automatic installation of peer dependencies on npm 3, but if you'd like that to be taken care of automatically, you can use npm-install-peers
I am quite new in React and front end dev.
I am following a tutorial from udemy that require to install react-simple-sidenav module in order to get a NavBar.
However when I try to install it no way to make it work. I get the following error message after running the command npm install react-simple-sidenav
And the navBar doest not work event if it is copy past from the tuto
npm WARN react-simple-sidenav#0.1.6 requires a peer of react-dom#^15.0.0 but none is installed. You must install peer depe
ndencies yourself.
Could you help me ?
You need to install react-dom from NPM library, in your command line type the following:
npm i -s react-dom
Hey there!
So, I'm testing React-Native and this problem have come up, and not sure what it wants.
I have upgraded it, and also download latest versions.
This is the error:
npm WARN react-native-camera#0.6.0 requires a peer of react#>=15.4.0
but none was installed.
It won't allow me to download it running the following command
npm install react-native-camera --save
Thanks for your time.
Hey i had the same problem with react native camera
First make sure the version is up to date.Either latest or next. Unless update it
as
npm install npm#latest -g
Then reinstall camera again(No need to uninstall anything, because it is not installed yet)
Here is the same issue that i opened in github now Closed because it solved the problem :)
EDIT:
i'm sure you got this error when you start to run
npm install react-native-camera#https://github.com/lwansbrough/react-native-camera.git --save
command right ? so it failed and never installed so,
what you have to do is run command
npm install npm#latest -g
then run
npm install react-native-camera#https://github.com/lwansbrough/react-native-camera.git --save
back again
I'm with npm version 2.15.5 . When doing an npm install command, npm is warning me about the fact that NPM3+ will no more install some dependencies..
The peer dependency reflect-metadata#0.1.2 included from angular2 will no
longer be automatically installed to fulfill the peerDependency
in npm 3+. Your application will need to depend on it explicitly.
There is surely a good reason for that but I can't get it.. I put all my hopes in my package manager to be able to install the dependencies... So why It will not be the case with the latest version?