That npx command probably relies on dev dependencies that aren’t present when deployed. A few ideas:
-
Maybe try running npm install on the instance and try again. You could also install
esbuild-register
but who knows what other dependencies will be missing afterwards. -
Run the seed command in your Dockerfile and check everything is working locally then deploy using your updated Dockerfile.
-
Deploy a fly db, proxy it, and run this seed command against your local deps. Then deploy the app connected to the pre-seeded DB.
Option 2 is great for getting things up and running reliably, but 3 makes sense if you need to scale this app to more instances and you don’t want to include data seeding in the image.