Cloud foundry: 'Application failed to start' with mongoose

I have a simple express app with mongoose. When I try to upload it to cloudfoundry using vmc push, the deployment process fails at:

Checking savenswap... GAVE UP
Application failed to start.

I thing the problem is when I use the line:

var mongoose = require('mongoose');

it fails, because when I don't use mongoose, but mongoDB normally, it succeeds in uploading the app. Do I have to run like a npm install on my cloudfoundry instance??

Upvotes: 0

Views: 311

Answers (1)

anon
anon

Reputation:

Cloud Foundry should handle the installation of npm modules. Do you have a valid package.json file listing your dependencies? Have you run npm install and shrinkwrap locally?

See http://blog.cloudfoundry.com/2012/12/19/recent-changes-in-node-js-modules-support/ for more on this.

Upvotes: 3

Related Questions