I’m trying to initialize (not deploy) a new Node app by executing the command fly launch in the root directory of the project (in Windows PowerShell). It asks for a name, region etc, and does indeed create the app, but ultimately fails with this error:
Error: open Dockerfile: The system cannot find the file specified.
The app appears in the list of apps when I use the command fly apps list, however its status is “Pending”, and no fly.toml or Dockerfile have been generated in the project’s directory.
Is fly launch supposed to generate the Dockerfile? I have used fly launch with another Node project some time ago, and there does appear to be a file called Dockerfile in that project’s root directory, so I assume that fly launch generated it back then.
Why isn’t it generating it now? Or what else could be causing this error?
Indeed. I’ve been making changes in this area recently (for example there was a bug involving usage of pnpm), so having a matching and up to date flyctl and dockerfile-node may be important. Updating flyctl would verify that this problem has not already been fixed. Before running launch again, remove any line in your package.json that contains @flydotio/dockerfile.
If all else fails, can you post your package.json file and I’ll try to reproduce the problem.