First Time deploying to fly.io
I tried to deploy using fly deploy
but it failed so I followed this tutorial Build A MERN Finance Dashboard App | Machine Learning, Typescript, React, Node, MUI, Deployment - YouTube
I tried to deploy it using the command fly deploy --local-only
using Docker locally and I got this error:
=> ERROR [build 3/5] RUN npm install --production=false 3.3s
------
> [build 3/5] RUN npm install --production=false:
#10 0.938 npm WARN config production Use `--omit=dev` instead.
#10 3.216 npm ERR! code ERESOLVE
#10 3.226 npm ERR! ERESOLVE could not resolve
#10 3.226 npm ERR!
#10 3.227 npm ERR! While resolving: mongoose-currency@0.2.0
#10 3.227 npm ERR! Found: mongoose@7.0.3
#10 3.228 npm ERR! node_modules/mongoose
#10 3.229 npm ERR! mongoose@"^7.0.3" from the root project
#10 3.229 npm ERR!
#10 3.230 npm ERR! Could not resolve dependency:
#10 3.231 npm ERR! peer mongoose@"~> 4.x" from mongoose-currency@0.2.0
#10 3.231 npm ERR! node_modules/mongoose-currency
#10 3.232 npm ERR! mongoose-currency@"^0.2.0" from the root project
#10 3.233 npm ERR!
#10 3.233 npm ERR! Conflicting peer dependency: mongoose@4.13.21
#10 3.233 npm ERR! node_modules/mongoose
#10 3.234 npm ERR! peer mongoose@"~> 4.x" from mongoose-currency@0.2.0
#10 3.234 npm ERR! node_modules/mongoose-currency
#10 3.235 npm ERR! mongoose-currency@"^0.2.0" from the root project
#10 3.236 npm ERR!
#10 3.237 npm ERR! Fix the upstream dependency conflict, or retry
#10 3.238 npm ERR! this command with --force or --legacy-peer-deps
#10 3.238 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
#10 3.238 npm ERR!
#10 3.238 npm ERR!
#10 3.238 npm ERR! For a full report see:
#10 3.238 npm ERR! /root/.npm/_logs/2023-04-28T09_06_28_271Z-eresolve-report.txt
#10 3.242
#10 3.242 npm ERR! A complete log of this run can be found in:
#10 3.242 npm ERR! /root/.npm/_logs/2023-04-28T09_06_28_271Z-debug-0.log
------
Error: failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c
npm install --production=false]: exit code: 1
It seems that it has nothing to do with mongoose, but I’m not sure what is actually happening.