Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:04:10+00:00 2026-06-12T12:04:10+00:00

I am using out of the box expressjs app, and I’m using node 0.8.2.

  • 0

I am using out of the box expressjs app, and I’m using node 0.8.2. Works great locally, but when I push to the Cloud Foundry I get the following error, and I have no idea where to start with debugging. I’m assuming that this is caused by a configuration issue or a dependency issue, but I don’t know what to do.

Express
500 TypeError: Object # has no method ‘randomBytes’

at Object.uid (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/utils.js:122:17)
at MemoryStore.generate (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/middleware/session.js:203:27)
at generate (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/middleware/session.js:281:13)
at Object.session [as handle] (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/middleware/session.js:290:7)
at next (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.cookieParser [as handle] (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js:60:5)
at next (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.methodOverride [as handle] (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:37:5)
at next (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at multipart (/var/vcap/data/dea/apps/dwgapp1-0-690016dc6c7142f385b44b144d3d380e/app/node_modules/express/node_modules/connect/lib/middleware/multipart.js:62:61)

    var express = require('express')
       , routes = require('./routes')
       , user = require('./routes/user')
       , http = require('http')
       , path = require('path');

    var app = express();

    app.configure(function(){
       app.set('port', process.env.VCAP_APP_PORT || 3000);
       app.set('views', __dirname + '/views');
       app.set('view engine', 'ejs');
       app.use(express.favicon());
       app.use(express.logger('dev'));
       app.use(express.bodyParser());
       app.use(express.methodOverride());
       app.use(express.cookieParser('your secret here'));
       app.use(express.session());
       app.use(app.router);
       app.use(require('stylus').middleware(__dirname + '/public'));
       app.use(express.static(path.join(__dirname, 'public')));
    });

    app.configure('development', function(){
       app.use(express.errorHandler());
    });

    app.get('/', routes.index);
    app.get('/users', user.list);

    http.createServer(app).listen(app.get('port'), function(){
       console.log("Express server listening on port " + app.get('port'));
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:04:12+00:00Added an answer on June 12, 2026 at 12:04 pm

    It seems that this issue was caused by connect, a dependency of express. I had originally created my app using express running on node 0.8.8, and CF was using 0.8.2. Even though I it didn’t seem to make a difference locally, when I deployed to Cloud Foundry I was getting this error.

    I created an entirely new app, running Node 0.8.2 from the beginning. This seemed to fix the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jquery fullcalendar and asp.net-mvc. It works fine out of the box
I have an app that is using standard out of the box form validation
I am using the out of the box MVC4 OpenId implementation. I get the
I am using the jQuery UI library out of the box, based on a
I've been using osTicket right out of the box for a couple years now
How to make this type of image popping out of box using XHTML css.
I am using the Out-Of-The-Box preview viewstyle for displaying a list. My requirement is
I have document library where I am using the Out-Of-the box document approval workflow.
I have an application that is multilingual. I'm using the out-of-the-box .Net features for
I'm using jsp of out-of-box portlet like feed.jspf in Liferay 6: String articleId =null;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.