Hi. I have been trying to host apps on fly for some time now and I have had 0 luck. I’ve tried so many solutions I found online but each time I implement it I get a different error. For now, I am stuck on the error in the title and seems I cannot do anything about it.
This is the order of commands I use
flyctl launch
flyctl deploy
Then terminal shows
==> Verifying app config
→ Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: You hit a Fly API error with request ID: 01GHA2KWBT58H8J32W7KPRHZF3-otp
Error failed to fetch an image or build from source: error connecting to docker: You hit a Fly API error with request ID: 01GHA2KX0AGYKB7T5BZ4TNF1SA-otp
Also, flyctl.exe is updated to the latest version.
@jphenow It works now, as in it starts the building process but ends up with another error:
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c npm install && npm run build]: exit code: 1
The build process ends with the lines
#12 3.416 > webpack --mode production #12 3.416 #12 3.464 CLI for webpack must be installed. #12 3.464 webpack-cli (GitHub - webpack/webpack-cli: Webpack's Command Line Interface) #12 3.464 #12 3.464 We will use “npm” to install the CLI via “npm install -D webpack-cli”. #12 3.465 Do you want to install ‘webpack-cli’ (yes/no):
Since you mentioned that, I put all webpack and webpack loader dependencies from devDependencies to production dependencies and the build was successful. Any way to keep them as dev dependencies?
PS Although the build was successful, I cannot access the website. It loads for about a minute or two then gives " This page isn’t working at the moment
Interesting - if you run fly logs do you see any useful information?
It might be useful to re-deploy or try opening the site while you have fly logs running since they’ll stream.
Yea that makes sense. You set this up with fly launch yes? Did it create a Dockerfile in your project for you? We should be able to change a few pieces of that build to make that work.