Receiving NPM Code EUSAGE error on deployment - node.js

I am trying to deploy a simple app to Railway.app
However I get the following error:
The app was working perfectly fine on Heroku before they jacked up the prices.
#11 3.081 npm WARN EBADENGINE Unsupported engine {
#11 3.081 npm WARN EBADENGINE package: 'react-quiz#2.0.0',
#11 3.081 npm WARN EBADENGINE required: { node: '16.14.2' },
#11 3.081 npm WARN EBADENGINE current: { node: 'v16.18.1', npm: '8.19.2' }
#11 3.081 npm WARN EBADENGINE }
#11 3.108 npm ERR! code EUSAGE
#11 3.115 npm ERR!
#11 3.115 npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
#11 3.116 npm ERR!
#11 3.116 npm ERR! Invalid: lock file's #babel/core#7.1.6 does not satisfy #babel/core#7.20.12
#11 3.116 npm ERR! Missing: #ampproject/remapping#2.2.0 from lock file
#11 3.116 npm ERR! Missing: gensync#1.0.0-beta.2 from lock file
#11 3.116 npm ERR! Missing: semver#6.3.0 from lock file
#11 3.116 npm ERR! Missing: #jridgewell/gen-mapping#0.1.1 from lock file
#11 3.116 npm ERR! Missing: #babel/core#7.1.6 from lock file
#11 3.116 npm ERR! Missing: fsevents#1.2.4 from lock file
#11 3.116 npm ERR! Missing: fsevents#1.2.13 from lock file
#11 3.116 npm ERR! Missing: bindings#1.5.0 from lock file
#11 3.116 npm ERR! Missing: file-uri-to-path#1.0.0 from lock file
#11 3.116 npm ERR! Missing: fsevents#2.3.2 from lock file
#11 3.116 npm ERR!
#11 3.116 npm ERR! Clean install a project
#11 3.116 npm ERR!
#11 3.116 npm ERR! Usage:
#11 3.116 npm ERR! npm ci
#11 3.116 npm ERR!
#11 3.116 npm ERR! Options:
#11 3.116 npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
#11 3.116 npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
#11 3.116 npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
#11 3.117 npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
#11 3.117 npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
#11 3.117 npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
#11 3.117 npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
#11 3.117 npm ERR!
#11 3.117 npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
#11 3.117 npm ERR!
#11 3.117 npm ERR! Run "npm help ci" for more info
#11 3.118
#11 3.119 npm ERR! A complete log of this run can be found in:
#11 3.119 npm ERR! /root/.npm/_logs/2023-02-14T10_28_38_117Z-debug-0.log
#11 ERROR: executor failed running [/bin/bash -ol pipefail -c npm ci]: exit code: 1
-----
> [stage-0 7/10] RUN --mount=type=cache,id=s/8d47156c-4108-4aea-a9b5-971f8e281867-/root/npm,target=/root/.npm npm ci:
-----
executor failed running [/bin/bash -ol pipefail -c npm ci]: exit code: 1
Error: Docker build failed
I have tried the following suggestions:
npm install --legacy-peer-deps (I have never actually seen this command work even though I see it suggested all the time)
Deleted package.lock.json and npm install
npm audit fix --force (Another command I see suggested all the time but never seems to do anything)
Does anyone have any workarounds, suggestions etc. ?

Related

How can I successfully deploy firebase functions?

I'm trying to deploy my Firebase functions using the Firebase CLI (firebase deploy --only functions), but I keep getting the following error:
Build failed: npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: #firebase/app-compat#0.2.3 from lock file
npm ERR! Missing: #firebase/app#0.9.3 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: idb#7.0.1 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /www-data-home/.npm/_logs/2023-02-18T13_26_52_861Z-debug-0.log; Error ID: beaf8772
Build failed: npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: #firebase/app-compat#0.2.3 from lock file
npm ERR! Missing: #firebase/app#0.9.3 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: idb#7.0.1 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /www-data-home/.npm/_logs/2023-02-18T13_27_30_745Z-debug-0.log; Error ID: beaf8772
Build failed: npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: #firebase/app-compat#0.2.3 from lock file
npm ERR! Missing: #firebase/app#0.9.3 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: idb#7.0.1 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /www-data-home/.npm/_logs/2023-02-18T13_27_26_236Z-debug-0.log; Error ID: beaf8772
Build failed: npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: #firebase/app-compat#0.2.3 from lock file
npm ERR! Missing: #firebase/app#0.9.3 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: #firebase/component#0.6.3 from lock file
npm ERR! Missing: #firebase/logger#0.4.0 from lock file
npm ERR! Missing: #firebase/util#1.9.2 from lock file
npm ERR! Missing: idb#7.0.1 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /www-data-home/.npm/_logs/2023-02-18T13_27_31_642Z-debug-0.log; Error ID: beaf8772
Functions deploy had errors with the following functions:
randomNumberCall(europe-west3)
randomNumberRequest(europe-west3)
stripeCheckout(europe-west3)
stripeCheckoutWithoutDbQueries(europe-west3)
i functions: cleaning up build files...
Error: There was an error deploying functions:
- Error Failed to create function stripeCheckout in region europe-west3
- Error Failed to create function stripeCheckoutWithoutDbQueries in region europe-west3
- Error Failed to create function randomNumberCall in region europe-west3
- Error Failed to create function randomNumberRequest in region europe-west3
Everything works fine when I test the functions with firebase emulators.
Here's the relevant part of my index.js file:
const stripe = require("stripe")(
"sk_test_XXXXXXXX"
);
const functions = require("firebase-functions");
const admin = require("firebase-admin");
admin.initializeApp(functions.config().firebase);
exports.stripeCheckout = functions
.region("europe-west3")
.https.onCall(async (data, context) => {
console.log(data);
const session = await stripe.checkout.sessions.create({
payment_method_types: ["card"],
line_items: data.items.map((item) => ({
quantity: 1,
price_data: {
currency: "eur",
unit_amount: item.price * 100,
product_data: {
name: item.summary,
// description: "description!"
images: [item.image]
}
}
})),
mode: "payment",
success_url: "http://localhost:4205/home?action=success",
cancel_url: "http://localhost:4205/home?action=cancel"
});
return session.id;
});
Any ideas on what could be causing this error? I appreciate your help! 🙏🏻
I tried running npm install and npm ci to make sure all dependencies are installed, but it did not work.
I also watched this video and did everything the same way: https://www.youtube.com/watch?v=r0tlQABfm9k&t=1064s&ab_channel=D-I-Ry

How to solve these errors, trying to download #railway/cli using npm install?

I am trying to download Railway CLI uisng npm install but I am getting these errors and I am not sure what to do.
Errors:
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Jash\\AppData\\Roaming\\npm\\node_modules\\#railway\\cli',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Jash\AppData\Roaming\npm\node_modules\#railway\cli\node_modules\node-fetch\src'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Jash\\AppData\\Roaming\\npm\\node_modules\\#railway\\cli\\node_modules\\node-fetch\\src'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\Jash\AppData\Roaming\npm\node_modules\#railway\cli
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./npm-install/postinstall.js
npm ERR! Error: aborted
npm ERR! at connResetException (node:internal/errors:711:14)
npm ERR! at TLSSocket.socketCloseListener (node:_http_client:454:19)
npm ERR! at TLSSocket.emit (node:events:525:35)
npm ERR! at node:net:313:12
npm ERR! at TCP.done (node:_tls_wrap:587:7) {
npm ERR! code: 'ECONNRESET'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jash\AppData\Local\npm-cache\_logs\2023-01-09T16_43_57_237Z-debug-0.log`
As some of the answers on another post suggested that I need a package.json file, I looked into the directory and the file was already there. Not sure what to do.

I'm trying to deploy my simple typescript app to firebase cloud functions. But I have got this error

Build failed: ...sing: idb#7.0.1 from lock file
npm ERR! Missing: #firebase/app-check-types#0.4.0 from lock file
npm ERR! Missing: selenium-webdriver#4.1.2 from lock file
npm ERR! Missing: #firebase/auth-types#0.11.0 from lock file
npm ERR! Missing: #firebase/webchannel-wrapper#0.6.2 from lock file
npm ERR! Missing: #firebase/firestore-types#2.5.0 from lock file
npm ERR! Missing: #firebase/app-check-interop-types#0.1.0 from lock file
npm ERR! Missing: #firebase/messaging-interop-types#0.1.0 from lock file
npm ERR! Missing: #firebase/functions-types#0.5.0 from lock file
npm ERR! Missing: #firebase/installations-types#0.4.0 from lock file
npm ERR! Missing: #firebase/performance-types#0.1.0 from lock file
npm ERR! Missing: #firebase/remote-config-types#0.2.0 from lock file
npm ERR! Missing: #firebase/storage-types#0.6.0 from lock file
npm ERR! Missing: #grammyjs/types#2.8.2 from lock file
npm ERR! Missing: chokidar#3.5.3 from lock file
npm ERR! Missing: debug#3.2.7 from lock file
npm ERR! Missing: ignore-by-default#1.0.1 from lock file
npm ERR! Missing: pstree.remy#1.1.8 from lock file
npm ERR! Missing: semver#5.7.1 from lock file
npm ERR! Missing: simple-update-notifier#1.0.7 from lock file
npm ERR! Missing: supports-color#5.5.0 from lock file
npm ERR! Missing: touch#3.1.0 from lock file
npm ERR! Missing: undefsafe#2.0.5 from lock file
npm ERR! Missing: anymatch#3.1.2 from lock file
npm ERR! Missing: fsevents#2.3.2 from lock file...
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--no-audit] [--foreground-scripts] [--ignore-scripts]
npm ERR! [--script-shell <script-shell>]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /www-data-home/.npm/_logs/2022-08-22T07_49_29_487Z-debug-0.log; Error ID: beaf8772
Functions deploy had errors with the following functions:
router(us-central1)
i functions: cleaning up build files...
It looks like you have not executed "npm install". After deployment you have to install your dependencies

Vs code not working in my linux npm err sowing?

protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install
[sudo] password for protons:
npm notice
npm notice New minor version of npm available! 8.12.1 -> 8.13.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.13.2
npm notice Run npm install -g npm#8.13.2 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-otp-input#2.4.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! peer react#">=16.0.0" from #ant-design/icons#4.7.0
npm ERR! node_modules/#ant-design/icons
npm ERR! #ant-design/icons#"^4.7.0" from the root project
npm ERR! 77 more (#emotion/react, #emotion/styled, #icons/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.2.0" from react-otp-input#2.4.0
npm ERR! node_modules/react-otp-input
npm ERR! react-otp-input#"^2.3.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.2.0" from react-otp-input#2.4.0
npm ERR! node_modules/react-otp-input
npm ERR! react-otp-input#"^2.3.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 /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-07-01T06_16_23_962Z-debug-0.log
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ ^C
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ npm install -g npm#8.13.2
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/usr/local/lib/node_modules/npm',
npm ERR! dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/protons/.npm/_logs/2022-07-01T06_20_59_076Z-debug-0.log
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install -g npm#8.13.2
changed 24 packages, and audited 202 packages in 4s
11 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-otp-input#2.4.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! peer react#">=16.0.0" from #ant-design/icons#4.7.0
npm ERR! node_modules/#ant-design/icons
npm ERR! #ant-design/icons#"^4.7.0" from the root project
npm ERR! 77 more (#emotion/react, #emotion/styled, #icons/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.2.0" from react-otp-input#2.4.0
npm ERR! node_modules/react-otp-input
npm ERR! react-otp-input#"^2.3.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.2.0" from react-otp-input#2.4.0
npm ERR! node_modules/react-otp-input
npm ERR! react-otp-input#"^2.3.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 /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-07-01T06_22_32_536Z-debug-0.log
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ ^C
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ npm fund
natty_hatty_facility_portal#0.1.0
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$
First delete package-lock.json and node_modules folder
then run
npm install --legacy-peer-deps
or
sudo npm install --legacy-peer-deps
try with :
npm install --legacy-peer-deps
Run the following command.
sudo npm intall --force

Unable to resolve dependency conflict error when dockerizing react app

When I type:
docker build -t dashboard:latest .
It gives this dependency error
code ERESOLVE
#9 83.73 npm ERR! ERESOLVE unable to resolve dependency tree
#9 83.73 npm ERR!
#9 83.73 npm ERR! While resolving: react-berry-admin-template#0.0.4
#9 83.73 npm ERR! Found: react#17.0.2
#9 83.73 npm ERR! node_modules/react
#9 83.74 npm ERR! react#"^17.0.2" from the root project
#9 83.74 npm ERR!
#9 83.74 npm ERR! Could not resolve dependency:
#9 83.74 npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from react-custom-scrollbars#4.2.1
#9 83.74 npm ERR! node_modules/react-custom-scrollbars
#9 83.74 npm ERR! react-custom-scrollbars#"^4.2.1" from the root project
#9 83.74 npm ERR!
#9 83.74 npm ERR! Fix the upstream dependency conflict, or retry
#9 83.74 npm ERR! this command with --force, or --legacy-peer-deps
#9 83.74 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
I Used –legacy-peer-deps i.e:
npm install --save --legacy-peer-deps
but it didn't fix the issue

Resources