node.jsherokucedar

Changing app from one language to another in heroku


Is it possible to switch a Heroku app on the Cedar stack from one language to another?

In this particular instance I am trying to migrate an app from PHP to NodeJS, which is being detected as a NodeJS app after performing a git push:

-----> Heroku receiving push
-----> Node.js app detected
-----> Fetching Node.js binaries
-----> Vendoring node 0.4.7
-----> Installing dependencies with npm 1.0.94

       Dependencies installed
-----> Discovering process types
       Procfile declares types -> web
-----> Compiled slug size is 5.0MB
-----> Launching... done, v7

... however it then crashes with:

Error: No such file or directory - node main.js

Trying to run the Node REPL also suggests the binary doesn't exist:

> heroku run node
Running node attached to terminal... up, run.1
sh: node: not found

Is there any way to reinitialise a Cedar stack app, without creating a new instance?


Solution

  • Create a new instance application instance. It is probably not a good idea to try to morph one into the other. DNS will update for you automatically as that's handled by the routing mesh, and you'll be much happier and better off for it.

    I (although a slightly different use case) migrated an application from Bamboo to Cedar and the whole process took me less than five minutes. The only downtime was a couple of seconds while I relocated the custom domain setup on the application.