I just tried to follow the Next.js tutorial for an existing next.js project on my local computer.
It failed at detecting the Next.js app but detected NodeJS app. It asked for the app name, the region to deploy, and if I want PG and Redis. After that it failed with the following error: Error: open Dockerfile: no such file or directory
Am I doing something wrong? I don’t have Docker in that directory.
Edit: The above presumes that you have a fly.toml file. If you don’t, run fly apps list to see if your app is there. If so, you can destroy it using fly destroy -y followed by the app name, then run fly launch again.
I’ll give quick answers, but feel free to ask follow up questions if you want more depth.
Node has too many frameworks. And options. For example, you are using pnpm. Supporting each combination is unworkable. So, I’m starting over. I built a base that supports all node apps, and then adding specific tailoring based on feature detection. That way pnpm support is implemented exactly once and works with all frameworks.
Indeed. If you want to chase all the way down the rabbit hole, you will end up with a REST interface. There also are more granular CLI commands that will do specific tasks, like create an application, clone a machine, set a secret, or create a volume. The fly.toml file itself is only needed by the helpers, and Dockerfiles are but one way to create an OCI image.