error while installing node modules for react application - reactjs

I'm new to reactjs , while installing the this package I'm getting
this following error
npm install react-router-dom
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.

Related

Understanding peer dependency error for an npm package

I'm trying to understand a peer dependency error from an npm package.
The error:
Could not resolve dependency:
peer react#"^18.2.0" from react-test-renderer#18.2.0
node_modules/react-test-renderer
dev react-test-renderer#"^18.2.0" from the root project
peer react-test-renderer#">=16.0.0" from #testing-library/jest-native#5.1.2
node_modules/#testing-library/jest-native
dev #testing-library/jest-native#"*" from the root project
I understand that #testing-library/jest-native#5.1.2 depends on react-test-renderer#">=16.0.0" - basically a version of react-test-renderer equal or higher than version 16.0.0. So why am I getting this peer dependency error if the package version installed fulfills the requirement?

React Bootstrap application not running

I am trying to run my react bootstrap app with the command npm start, however this error appears
#babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining#7.14.5 requires a peer of #babel/core#^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#5.0.0-alpha1 requires a peer of popper.js#^1.16.0 but none is installed. You must install peer dependencies yourself.
This is my package.json: https://hastebin.com/saforuvocu.json

React-webcam not getting added to my react project

I did the following to install react-webcam,
sudo npm install -g --save react-webcam
npm WARN react-webcam#3.0.1 requires a peer of react#>=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-webcam#3.0.1 requires a peer of react-dom#>=15.3.0 but none is installed. You must install peer dependencies yourself.
+ react-webcam#3.0.1
added 1 package from 1 contributor in 0.351s
but it wasnt added to the dependencies in package.json, So how can I add it to the node modules?

react-qr-reader installation issue with REACT

I'm trying to install react-qr-reader from https://github.com/JodusNodus/react-qr-reader. I installed REACT and REACT dom just fine but after I added the react-qr-reader package I get this:
root#server [~]# npm install --save react-qr-reader
npm WARN react-qr-reader#2.0.1 requires a peer of react#^15.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-qr-reader#2.0.1 requires a peer of react-dom#^15.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN root#1.0.0 No description
npm WARN root#1.0.0 No repository field.
How can I identity the missing peer?
When I try and load the js script I get an "Uncaught SyntaxError: Unexpected identifier" at that line: "import React, { Component } from 'react'". So I'm assuming PEAR is not even properly installed.
First you need to install react and react-dome
npm i react react-dom
Then try install react-qr-reader with sudo command
sudo npm i react-qr-reader --save
npm i react-qr-reader --force
use This its definitely Work For You

Error Installing React

Whenever I do a npm init then npm install react - I get this error
── UNMET PEER DEPENDENCY react#15.3.0
npm WARN baobab-react#0.1.1 requires a peer of react#>=0.13.0 <1.0.0 but none was installed.
npm WARN fixed-data-table#0.4.7 requires a
peer of react#>=0.13.0 <0.15.0 || ^0.14.0-beta3 but none was
installed.
npm WARN react-native#0.30.0 requires a peer of
react#~15.2.0 but none was installed.
npm WARN react-router#0.13.5
requires a peer of react#0.13.x||0.14.x but none was installed. npm
ERR! code 1
This is my node v6.3.0 annd npm 3.10.3 versions.
npm install react --no-optional
Inside your project directory, can you please first run the following commands:-
1) rm -rf node_modules
2) Try installig react again now and other packages which are in your package.json file.

Resources