While deploying the react app in Heroku I am getting below error. I have deleted package-lock.json and did an npm install again, but again I am getting the same error. Could someone please advise on how can I resolve the error ?
Following are the dependencies installed :
"dependencies": {
"#emotion/react": "^11.9.0",
"#emotion/styled": "^11.8.1",
"#material-ui/core": "^4.12.4",
"#mui/icons-material": "^5.8.3",
"#mui/material": "^5.8.3",
"#testing-library/jest-dom": "^5.16.4",
"#testing-library/react": "^13.1.1",
"#testing-library/user-event": "^13.5.0",
"axios": "^0.27.2",
"cors": "^2.8.5",
"express": "^4.18.1",
"multer": "^1.4.4",
"mysql2": "^2.3.3",
"path": "^0.12.7",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-hook-form": "^7.31.2",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"react-tweet-embed": "^2.0.0",
"sequelize": "^6.20.1",
"web-vitals": "^2.1.4"
},
Logs from Heroku app:
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.15.1...
Using default npm version: 8.11.0
-----> Installing dependencies
Installing node modules
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #material-ui/core#4.12.4
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.0.0" from the root project
npm ERR! peer react#">= 16" from react-scripts#5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"^5.0.1" from the root project
npm ERR! 16 more (#mui/utils, react-router-dom, #emotion/react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"^4.12.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"^4.12.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /tmp/npmcache.MrETS/eresolve-report.txt for a full report.
try to add npm --legacy-peer-deps in the heroku
adding "preinstall": "npx npm-force-resolutions", and "heroku-postbuild": "npm install" to the package.json file as follow, helped me through this problem
"scripts": { "start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"preinstall": "npx npm-force-resolutions",
"heroku-postbuild": "npm install" }
Related
I am still learning how to read these error messages, hopefully someone can help me learn how to do this.
I am trying to install react-data-grid with npm in my project directory. I also receive this error when trying to run any npm installs on the same project from another directory (for a different github repository).
The error:
kylebessemer#Kyles-Mac-mini react-app % npm install react-data-grid
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: halogen#0.2.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#">=16.8.0" from #emotion/react#11.8.1
npm ERR! node_modules/#emotion/react
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.8.1
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.5.0
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.5.0
npm ERR! node_modules/#mui/icons-material
npm ERR! 4 more (#mui/lab, #mui/x-data-grid, #mui/x-date-pickers, the root project)
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.5.0
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.5.0
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.5.0" from the root project
npm ERR! 4 more (#mui/lab, #mui/x-data-grid, #mui/x-date-pickers, the root project)
npm ERR! 3 more (#mui/styled-engine, #mui/system, the root project)
npm ERR! peer react#">=16.8.0" from #emotion/styled#11.8.1
npm ERR! node_modules/#emotion/styled
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.5.0
npm ERR! node_modules/#mui/material
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.5.0
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"^5.5.0" from the root project
npm ERR! 4 more (#mui/lab, #mui/x-data-grid, #mui/x-date-pickers, the root project)
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/styled-engine#5.6.0
npm ERR! node_modules/#mui/styled-engine
npm ERR! #mui/styled-engine#"^5.6.0" from #mui/system#5.6.0
npm ERR! node_modules/#mui/system
npm ERR! #mui/system#"^5.6.0" from #mui/lab#5.0.0-alpha.76
npm ERR! node_modules/#mui/lab
npm ERR! 3 more (#mui/material, #mui/x-data-grid, #mui/x-date-pickers)
npm ERR! 2 more (#mui/system, the root project)
npm ERR! 35 more (#mui/base, #mui/icons-material, #mui/lab, #mui/base, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14.8" from halogen#0.2.0
npm ERR! node_modules/halogen
npm ERR! halogen#"^0.2.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#0.14.10
npm ERR! node_modules/react
npm ERR! peer react#"^0.14.8" from halogen#0.2.0
npm ERR! node_modules/halogen
npm ERR! halogen#"^0.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/kylebessemer/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kylebessemer/.npm/_logs/2022-07-12T14_31_15_098Z-debug-0.log
package.json:
{
"name": "react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"#emotion/react": "^11.8.1",
"#emotion/styled": "^11.8.1",
"#mui/icons-material": "^5.5.0",
"#mui/lab": "^5.0.0-alpha.76",
"#mui/material": "^5.5.0",
"#mui/x-data-grid": "^5.6.1",
"#reduxjs/toolkit": "^1.8.0",
"#testing-library/jest-dom": "^5.16.2",
"#testing-library/react": "^12.1.3",
"#testing-library/user-event": "^13.5.0",
"bootstrap": "^5.1.3",
"buffer": "^6.0.3",
"date-fns": "^2.28.0",
"faker": "^6.6.6",
"halogen": "^0.2.0",
"plotly.js": "^2.11.0",
"react": "^17.0.2",
"react-bootstrap": "^2.2.0",
"react-chartjs-2": "^4.0.1",
"react-circular-progressbar": "^2.0.4",
"react-csv": "^2.2.2",
"react-dark-mode-toggle": "^0.2.0",
"react-dom": "^17.0.2",
"react-loading": "^2.0.3",
"react-plotly.js": "^2.5.1",
"react-redux": "^7.2.6",
"react-router-dom": "^6.2.2",
"react-scripts": "5.0.0",
"reactjs-percentage-circle": "^1.0.0",
"styled-components": "^5.3.5",
"usehooks-ts": "^2.4.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
i have a problem when i try to install react-leaflet-draw react-leaflet --save i had this error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: siis-new#0.1.0
npm ERR! Found: react-leaflet#3.2.5
npm ERR! node_modules/react-leaflet
npm ERR! react-leaflet#"^3.2.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-leaflet#"^2.0.0" from react-leaflet-draw#0.19.8
npm ERR! node_modules/react-leaflet-draw
npm ERR! react-leaflet-draw#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/hafizewp/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/PC/.npm/_logs/2022-04-12T10_02_53_677Z-debug.log
and i dont want to change my react version !
We faced similar issue, it is due to conflict in versions !
Tried the --legacy-peer-deps option and we needed to add leafelet and leaflet-draw JS libs in addition to the react ones. Here is how our current dependencies looks like, we are using node v16.14.2
Hopefully this helps in your scenario
"dependencies": {
"#emotion/react": "^11.9.0",
"#emotion/styled": "^11.8.1",
"#id-sdk/util": "^3.0.0-pre.10",
"#material-ui/icons": "^4.11.3",
"#mui/icons-material": "^5.6.1",
"#mui/lab": "^5.0.0-alpha.77",
"#mui/material": "^5.6.1",
"#testing-library/jest-dom": "^5.16.4",
"#testing-library/react": "^12.1.4",
"#testing-library/user-event": "^13.5.0",
"axios": "^0.26.1",
"leaflet": "^1.7.1",
"leaflet-draw": "^1.0.4",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-dotenv": "^0.1.3",
"react-leaflet": "3.2.1",
"react-leaflet-draw": "0.19.8",
"react-query": "^3.34.19",
"react-scripts": "5.0.0",
"uninstall": "^0.0.0",
"web-vitals": "^2.1.4"
}
i made a commit to a repo today and when we tried to start the server it gave an error from react.script named "Type Error: chalk.constructor is not a constructor" as a fix we tried to delete lock files (we had both yarn and npm lock) and delete node modules files, and after an npm install after that, it gave us this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-scripts#3.4.1
npm ERR! Found: typescript#4.0.8
npm ERR! node_modules/typescript
npm ERR! typescript#"~4.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript#"^3.2.1" from react-scripts#3.4.1
npm ERR! node_modules/react-scripts
npm ERR!
npm ERR! Conflicting peer dependency: typescript#3.9.10
npm ERR! node_modules/typescript
npm ERR! peerOptional typescript#"^3.2.1" from react-scripts#3.4.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"3.4.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See *** for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! ***
PS *** npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-scripts#3.4.1
npm ERR! Found: typescript#4.0.8
npm ERR! node_modules/typescript
npm ERR! typescript#"~4.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript#"^3.2.1" from react-scripts#3.4.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"3.4.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typescript#3.9.10
npm ERR! peerOptional typescript#"^3.2.1" from react-scripts#3.4.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"3.4.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See *** for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! ***
I censored the paths for privacy purposes. But after that i changed typescript package version to typescript#"^3.2.1" and it still didn't work, after that i used the "npm install --save --legacy-peer-deps" command and it still didn't work. Can anyone please offer any advice?
Update: The package.json is below
{
"name": "company-name",
"version": "0.1.0",
"private": true,
"dependencies": {
"#material-ui/core": "^4.11.0",
"#material-ui/icons": "^4.9.1",
"#material-ui/lab": "^4.0.0-alpha.56",
"#material-ui/styles": "^4.10.0",
"#react-pdf/renderer": "2.0.0-beta.6",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.3.2",
"#testing-library/user-event": "^7.1.2",
"#tinymce/tinymce-react": "^3.6.1",
"#types/file-saver": "^2.0.1",
"#types/html2canvas": "^0.0.35",
"#types/jest": "^24.0.0",
"#types/jspdf": "^1.3.3",
"#types/node": "^12.0.0",
"#types/react": "^16.9.0",
"#types/react-color": "^3.0.4",
"#types/react-dom": "^16.9.0",
"#types/react-notifications-component": "^2.4.0",
"#types/react-redux": "^7.1.9",
"#types/react-router-dom": "^5.1.5",
"#types/react-text-mask": "^5.4.6",
"#types/react-virtualized": "^9.21.10",
"#types/uuid": "^8.3.0",
"#types/yup": "^0.29.3",
"axios": "^0.19.2",
"bootstrap": "^4.5.0",
"computed-style-to-inline-style": "^3.0.0",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"fontsource-roboto": "3.0.3",
"formik": "^2.1.5",
"fs": "^0.0.1-security",
"html-to-image": "^1.6.1",
"html2canvas": "^1.0.0-rc.7",
"jquery": "^3.5.1",
"js-file-download": "^0.4.12",
"jspdf": "^1.5.3",
"moment": "^2.27.0",
"popper.js": "^1.16.1",
"potrace": "^2.1.6",
"react": "^16.13.1",
"react-bootstrap": "^1.0.1",
"react-bootstrap-sweetalert": "^5.2.0",
"react-color": "^2.18.1",
"react-credit-card-input": "^1.1.5",
"react-dom": "^16.13.1",
"react-material-ui-carousel": "^2.0.0",
"react-notifications-component": "^2.4.0",
"react-player": "^2.4.0",
"react-recaptcha": "^2.3.10",
"react-redux": "^7.2.0",
"react-responsive-carousel": "^3.2.9",
"react-router-dom": "^5.2.0",
"react-router-hash-link": "^2.3.1",
"react-scripts": "3.4.1",
"react-text-mask": "^5.4.3",
"react-virtualized": "^9.22.2",
"redux-thunk": "^2.3.0",
"styled-components": "^5.2.0",
"sweetalert2": "^11.1.0",
"typescript": "~4.0.2",
"uuid": "^8.3.0",
"xlsx": "^0.17.0",
"yup": "^0.29.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prod": "serve -s build -l 3000",
"build-run-prod": "react-scripts build && serve -s build -l 3000"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I am trying to npm install and running into dependency issues. The goal is to npm start and npm run build both of which were disrupted somehow.
This is among my first experiences handling dependency issues. The ideal answer includes the thought process one might use to address such a task, if possible, but it is just a bonus.
The root of the problem is that npm start gives me:
> postmassiv#0.1.0 start
> react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
So its like ok just install react scripts! npm install react-scripts
I get this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: postmassiv#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0-0" from enzyme-adapter-react-16#1.15.6
npm ERR! node_modules/enzyme-adapter-react-16
npm ERR! dev enzyme-adapter-react-16#"^1.15.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
My error message after running npm install:
identical to above error
Note this error also occurs identically if i npm install enzyme-adapter-react-16 which I figured would be worth trying.
Tried npm install --save-dev #wojtekmaj/enzyme-adapter-react-17 but I get the same error msg. Note that this #wojtekmaj/ thing is made to replace enzyme-adapter-react-17 until its ready.
So I tried npm uninstall enzyme-adapter-react-16 and got:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR! peer react#">=16.3.2" from #restart/context#2.1.4
npm ERR! node_modules/#restart/context
npm ERR! #restart/context#"^2.1.4" from react-bootstrap#1.6.1
npm ERR! node_modules/react-bootstrap
npm ERR! react-bootstrap#"^1.6.1" from the root project
npm ERR! 9 more (prop-types-extra, react-router, react-router-dom, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types#2.16.0
npm ERR! node_modules/airbnb-prop-types
npm ERR! airbnb-prop-types#"^2.16.0" from enzyme-adapter-utils#1.13.1
npm ERR! node_modules/enzyme-adapter-utils
npm ERR! enzyme-adapter-utils#"^1.13.1" from enzyme-adapter-react-16#1.15.4
npm ERR! node_modules/enzyme-adapter-react-16
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
Here is my package.json
{
"name": "postmassiv",
"version": "0.1.0",
"private": true,
"prettier": {
"tabWidth": 4
},
"dependencies": {
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^12.0.0",
"#testing-library/user-event": "^13.2.1",
"axios": "^0.21.1",
"bootstrap": "^5.0.2",
"js-cookie": "^3.0.0",
"node-sass": "^6.0.1",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-datepicker": "^4.1.1",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"rxjs": "^7.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6"
},
"proxy": "http://127.0.0.1:8080/"
}
Found success with the npm install --legacy-peer-deps flag. It installs and runs the server. I am now doing npm audit fix --legacy-peer-deps. The server npm starts correctly.
For pattern recognition: Seems the last person I saw to have this issue also used ncu as well. Think thats how I got the issue started in the first place
does someone encounter this problem while installing - react-messenger-customer-chat?
[Next.js, tailwind]
Here is github repo: https://github.com/Yoctol/react-messenger-customer-chat
package.json
{
"name": "with-tailwindcss",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"#headlessui/react": "^1.2.0",
"graphql": "^15.5.0",
"graphql-request": "^3.4.0",
"he": "^1.2.0",
"mdx-bundler": "^4.1.0",
"next": "^10.2.3",
"next-themes": "^0.0.14",
"react": "^17.0.2",
"react-dom": "^17.0.1",
"react-icons": "^4.2.0",
"sitemap": "^7.0.0"
},
"devDependencies": {
"autoprefixer": "^10.2.6",
"postcss": "^8.3.0",
"tailwindcss": "^2.1.4"
}
}
What am I supposed to do right now?
edit1:
npm i -S react#^16.x.x
error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react#16.14.0
npm ERR! node_modules/react
npm ERR! react#"16.x.x" from the root project
npm ERR! peer react#">=16" from #headlessui/react#1.2.0
npm ERR! node_modules/#headlessui/react
npm ERR! #headlessui/react#"^1.2.0" from the root project
npm ERR! 6 more (#next/react-dev-overlay, next, next-themes, react-icons, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.2" from react-dom#17.0.2
npm ERR! node_modules/react-dom
npm ERR! peer react-dom#"^16.9.0 || ^17" from #next/react-dev-overlay#10.2.3
npm ERR! node_modules/#next/react-dev-overlay
npm ERR! #next/react-dev-overlay#"10.2.3" from next#10.2.3
npm ERR! node_modules/next
npm ERR! peer next#"*" from next-themes#0.0.14
npm ERR! node_modules/next-themes
npm ERR! 1 more (the root project)
npm ERR! peer react-dom#"^16.6.0 || ^17" from next#10.2.3
npm ERR! node_modules/next
npm ERR! peer next#"*" from next-themes#0.0.14
npm ERR! node_modules/next-themes
npm ERR! next-themes#"^0.0.14" from the root project
npm ERR! 1 more (the root project)
npm ERR! 2 more (next-themes, the root project)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\bubuq3\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\bubuq3\AppData\Local\npm-cache\_logs\2021-06-14T11_30_57_998Z-debug.log
So I now I need older versio of next-themes and react-dom etc?
The problem is here:
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14.0 || ^15.0.0-0 || ^16.0.0-0" from react-messenger-customer-chat#0.8.0
You have react v.17 installed, but react-messenger-customer-chat requires version 15 or 16. You could install react 16 like this for example:
npm i -S react#^16.x.x