I have a simple node.js web server, consisting of 1 js file plus a directory of static files to serve. It worked fine in cloudfoundry v1, but when I try to push it to cloudfoundry v2 with the following command:
cf push --name myname --command "node app.js"
It fails with:
/var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:44:in `build_pack': Unable to detect a supported application type (RuntimeError)
Thanks for any suggestion.
I received the answer on a cloudfoundry forum (cloudfoundry.zendesk.com):
"The key indicator for Cloud Foundry that you are staging a node application is the presence of a 'package.json' file. Create one in your application folder with basic information and it should work."
I added a 'package.json' and now it works.