V5 is not possible to deploy to heroku! - code EBADENGINE

-----> Building on the Heroku-22 stack
-----> Using buildpack: heroku/nodejs
-----> Node.js app detected

-----> Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_VERBOSE=false
   NODE_ENV=production
   NODE_MODULES_CACHE=true

-----> Installing binaries
engines.node (package.json): >=18.0.0 <=20.x.x
engines.npm (package.json): >=6.0.0

   Resolving node version >=18.0.0 <=20.x.x...
   Downloading and installing node 19.9.0...
   Bootstrapping npm >=6.0.0 (replacing 9.6.3)...

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@10.9.0
npm ERR! notsup Not compatible with your version of node/npm: npm@10.9.0
npm ERR! notsup Required: {“node”:“^18.17.0 || >=20.5.0”}
npm ERR! notsup Actual: {“npm”:“9.6.3”,“node”:“v19.9.0”}
npm ERR! A complete log of this run can be found in: /tmp/npmcache.6rjlD/_logs/2024-10-04T02_05_28_072Z-debug-0.log
Unable to install npm >=6.0.0. Does npm >=6.0.0 exist? Is npm >=6.0.0 compatible with this Node.js version?
-----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys
   
   Some possible problems:
   
   - Dangerous semver range (>) in engines.node
     https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
   
   Love,
   Heroku

! Push rejected, failed to compile Node.js app.
! Push failed

This is due how the engines settings is configured on the create strapi install. Adjusting the engine setting to point at specific node or vm versions introduces another error that prevents build.

This topic has been created from a Discord post (1291772844858146918) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord