Deployed app using but getting This site can’t be reached

I deployed a Nuxt 3 app from Heroku using

Everything went well with no errors and it says “Deployment completed successfully” but when I go to the url it gives I get

This site can’t be reached

Is there additional setup required or what may I be missing?

First step is usually to check the logs to see if they report anything. Try running fly logs from your app’s local folder for a tail of the most recent entries. Do you see any errors?

I don’t know if you have any healthchecks for this app, but if not, it could be worth adding at least one (you can add e.g a tcp healthcheck and http healthcheck). Since if they fail, that stops your app deploying. If you don’t have any healthchecks defined, it may be that your app does appear to deploy successfully but is not actually running as expected. And so the error. That should show up in the logs, if so.

Since I did not deploy from my local machine, rather I used Heroku · Launch on I figured I have to run it as

fly logs -a gp-style-guide-nuxt

This gives me the same logs I see in the app console

2022-08-08T22:23:45Z runner[83b30cbb] lax [info]Starting instance
2022-08-08T22:23:45Z runner[83b30cbb] lax [info]Configuring virtual machine
2022-08-08T22:23:45Z runner[83b30cbb] lax [info]Pulling container image
2022-08-08T22:23:48Z runner[83b30cbb] lax [info]Unpacking image
2022-08-08T22:23:53Z runner[83b30cbb] lax [info]Preparing kernel init
2022-08-08T22:23:53Z runner[83b30cbb] lax [info]Configuring firecracker
2022-08-08T22:23:54Z runner[83b30cbb] lax [info]Starting virtual machine
2022-08-08T22:23:54Z app[83b30cbb] lax [info]Starting init (commit: c86b3dc)...
2022-08-08T22:23:54Z app[83b30cbb] lax [info]Preparing to run: `/bin/bash /app/ npm start` as heroku
2022-08-08T22:23:54Z app[83b30cbb] lax [info]2022/08/08 22:23:54 listening on [fdaa:0:80a7:a7b:a593:83b3:cbb:2]:22 (DNS: [fdaa::3]:53)
2022-08-08T22:23:54Z app[83b30cbb] lax [info]> start
2022-08-08T22:23:54Z app[83b30cbb] lax [info]> node .output/server/index.mjs
2022-08-08T22:23:54Z app[83b30cbb] lax [info]Listening on

So it looks like it is starting…

I do not have any healthchecks setup, I will look into how to set this up and try that.

Yep, that’s right for getting to the logs. You can pass an app flag like that. So that works. And yes, sure looks like the app exists and is listening.

I haven’t used that Heroku wizard button myself so I’m not sure if you can set your own healthcheck (within a custom fly.toml file). But given the final line of that log, I’m not sure that would help. As it would suggest the healthcheck would pass.

Hmm. I wonder if this thread would offer any clues. In their case it was an Elixir app, however Lubien explains what Fly does:

Thanks for the help!.

When I reloaded the page I saw a load of errors in the logs regarding a failed import for an Algolia search module in .app/output/server.mjs with the message

Did you mean to import algoliasearch/lite.js?

This is strange as it works on heroku and vercel, I wonder if it is the node version or something… I will have to see if I can find a solution.

I decided to try deploy from my local environment but ran in to another issue that has me stumped, all in all not making much progress yet :confused:

1 Like