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 8370807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:00:20+00:00 2026-06-09T14:00:20+00:00

While trying to execute server.js program I am getting the following error: var app

  • 0

While trying to execute server.js program I am getting the following error:

var app = express();
Type error: object is not a function 
   at object.<anonymous>

even tried re installing and changing the version of express to

npm install
npm uninstall express
npm install express@2.5.9

but it resulted in new error

fqdn = ~req.url.indexof(' ://')

I use windows and i am working on node.js version 0.8.4.

  • 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-09T14:00:21+00:00Added an answer on June 9, 2026 at 2:00 pm

    If you’re using Express < 3.0, the return value of require('express'); is not a function; you’ll need to create a server the old way.

    Express 2.x

    var express = require('express');
    var server = express.createServer();
    

    Express 3.x

    var http = require('http');
    var express = require('express');
    var app = express();
    var server = http.createServer(app);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started ROR Lynda Tutorial, Error while trying to execute the rails server in
A Microsoft Access implementation is throwing a type mismatch error while trying to execute
While trying to execute the following lines only the last two statements are displayed(Here
Hello I have a very large SQL script and while trying to execute it
Im trying to make a curtain effect where when the function is executed while
While trying to search with id sorting (and paginating) im getting from the log:
I am trying to execute a basic script on my server to automatically run
I am trying to get PHP to execute a curl connection to another server.
Help pls with getting magento attribute while checkbout. I have 'only_registered' attribute. I trying
Core dumped while running this program: int main(void) { sqlite3 *conn; int error =

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.