Unable to resolve dependency tree error with legacy peer deps - reactjs

I made an app in react with BuilderX and this happens when I type npm install in terminal:
And these are the dependencies
I would appreciate your help :)
I tried using npm install --save --legacy-peer-deps but it doesn't work

Related

using typescript and electron

getting error while installing npm ERR! ERESOLVE unable to resolve dependency tree.
used npm install --legacy-peer-deps and npm install --save, but issue not solved
any idea how yo solve it

Module not found: Can't resolve '#aws-amplify/core'

Trying to create a React App using amplify authentication, stuck with this error
Module not found: Can't resolve '#aws-amplify/core' in '..\node_modules#aws-amplify\api\lib-esm'
I have been referring to these two links:
https://dev.to/dabit3/the-complete-guide-to-user-authentication-with-the-amplify-framework-2inh
https://docs.amplify.aws/lib/auth/getting-started/q/platform/js
What have I already tried:
deleting node_modules and reinstalling the project
trying to explicitly install #aws-amplify/core using npm (This throws a separate error)
Any help is appreciated :)
I ran into this issue working with AWS Datastore which also depends on #amplify/core. Here's how I resolved it:
npm i #aws-amplify/core --save --legacy-peer-deps
React component:
import Amplify from "#aws-amplify/core
The legacy peer deps flag was required in my case as the install React version was greater than the version required for amplify/core. You may also need to amplify init or amplify pull first if you've not already done so.
The perfect solution is as mentioned above. I found this after a lot of research. Need to install #aws-amplify/core. But along with that in my react app, I have to install some more packages for cognito to work properly.
npm i #aws-amplify/core --save --legacy-peer-deps
npm i #aws-amplify/storage --save --legacy-peer-deps
npm i #aws-amplify/interactions --save --legacy-peer-deps
npm i #aws-amplify/auth --save --legacy-peer-deps
npm i #aws-amplify/api --save --legacy-peer-deps
npm i #aws-amplify/analytics --save --legacy-peer-deps
npm i #aws-amplify/xr --save --legacy-peer-deps
Do npm install aws-amplify#latest sometimes this problem happens cuz the version i think.
After stop the project and run it again.
I was facing the same errors after upgrading #aws-amplify/ui-react from 1.x to 4.x
I have tried the below steps and errors got resolved after that.
Removed node_modules and package-lock.json files.
npm install

Angular 4 project ng build --prod fail

My Angular project is #Angular4.0.0.
Angular CLI: 1.7.4
Node: 6.9.5
I'm getting the following errors while trying to run npm install and ng build --prod.
npm install errors
UNMET PEER DEPENDENCY bootstrap#4.0.0-alpha.6
UNMET PEER DEPENDENCY firebase#4.13.1
ng build --prod error
ERROR in scripts.0cfd151de42187092cb0.bundle.js from UglifyJs undefined
Please anyone help me to resolve this problem.?
It has missing peer dependencies, install the peer dependencies yourself. for example:
npm install bootstrap firebase
for your problem that should be: npm install bootstrap#4.0.0 npm install --save firebase#4.13.1

React requiring a peer React-Dom

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

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

Resources