Cannot build Strapi app during deployment that is using the same app name as a previous app that was destroyed.

I apologize if the topic title seems verbose, but I couldn’t think of a better way to describe the problem.

A few days ago, I had a Strapi app on Fly that I was having deployment issues with. Sometimes it would work, and sometimes the build would fail with this error:

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@8.12.1
npm ERR! notsup Not compatible with your version of node/npm: npm@8.12.1
npm ERR! notsup Required: {"node":"^12.13.0 || ^14.15.0 || >=16"}
npm ERR! notsup Actual:   {"npm":"8.11.0","node":"v15.14.0"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/heroku/.npm/_logs/2022-06-04T16_59_19_238Z-debug-0.log
ERROR: failed to build: exit status 1
Error failed to fetch an image or build from source: executing lifecycle: failed with status code: 51

So, I destroyed the app and created a new Strapi app on Fly. I noticed that if I chose the same app name as the previous app, it would not build (I would get the same error). But, if I used a different app name then it would build just fine.

With that said, if I build something other than Strapi, such as Remix, then I can use that app name just fine.