I’ve been trying to deploy my server on fly.io but I get this error while trying to run fly deploy --remote-only
=> ERROR [build 3/4] RUN npm ci 0.9s
------
> [build 3/4] RUN npm ci:
#10 0.900 npm ERR! code ERESOLVE
#10 0.903 npm ERR! ERESOLVE could not resolve
#10 0.903 npm ERR!
#10 0.903 npm ERR! While resolving: mongoose-currency@0.2.0
#10 0.903 npm ERR! Found: mongoose@7.3.4
#10 0.903 npm ERR! node_modules/mongoose
#10 0.903 npm ERR! mongoose@"^7.3.1" from the root project
#10 0.903 npm ERR!
#10 0.903 npm ERR! Could not resolve dependency:
#10 0.903 npm ERR! peer mongoose@"~> 4.x" from mongoose-currency@0.2.0
#10 0.903 npm ERR! node_modules/mongoose-currency
#10 0.904 npm ERR! mongoose-currency@"^0.2.0" from the root project
#10 0.904 npm ERR!
#10 0.904 npm ERR! Conflicting peer dependency: mongoose@4.13.21
#10 0.904 npm ERR! node_modules/mongoose
#10 0.904 npm ERR! peer mongoose@"~> 4.x" from mongoose-currency@0.2.0
#10 0.904 npm ERR! node_modules/mongoose-currency
#10 0.904 npm ERR! mongoose-currency@"^0.2.0" from the root project
#10 0.904 npm ERR!
#10 0.904 npm ERR! Fix the upstream dependency conflict, or retry
#10 0.904 npm ERR! this command with --force or --legacy-peer-deps
#10 0.904 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
#10 0.904 npm ERR!
#10 0.904 npm ERR!
#10 0.904 npm ERR! For a full report see:
#10 0.904 npm ERR! /root/.npm/_logs/2023-07-18T19_26_13_063Z-eresolve-report.txt
#10 0.905
#10 0.906 npm ERR! A complete log of this run can be found in:
#10 0.906 npm ERR! /root/.npm/_logs/2023-07-18T19_26_13_063Z-debug-0.log
------
Error: failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c npm ci]: exit code: 1
I’ve tried running the command with --legacy-peer-deps flag as well, but it doesn’t work. Is there a way to fix this. Thanks