2
votes

I am using IBM Bluemix for a school project.

I have finished the code and I need to send the application to the IBM Bluemix platform.

I am using the cf toolbar and the standar methods for sending the app to the cloud (cf login, cd into the new directory, cf push etc).

Nonetheless, I get the error

Staging Failed: An application could not be detected by any available buildpack

What is causing this and how can I solve it?

Here is a print of the error screen I get when sending the app to Bluemix - With the cf logs associated with the error.

enter image description hereenter image description here

1
Based on the error message , Your application may be missing package.json. Make sure your application has similar file structure as node.js sample app here : github.com/IBM-Bluemix/node-helloworldvmovva

1 Answers

-1
votes

When you push your application to Bluemix your root directory is scanned in order to understand what kind of buildpack should be used. In your case you need the Node.js buildpack, which is used when in your root directory you have the package.json file. It contains all the dependencies your application needs to run and it is used by the buildpack to download all the required libraries. If your application works fine on your machine it means that you have all the required libraries in the node_modules folder. You can use the npm init command to automatically generate the package.json file for all the libraries/middleware you need. Please take a look at Npm init Docs. You can also refer to Bluemix Node.js starter application to see the default package.json.