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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:09:13+00:00 2026-06-02T17:09:13+00:00

sorry for the silly question and im sure its a noob mistake. I am

  • 0

sorry for the silly question and im sure its a noob mistake. I am following the how to use for socket io: http://socket.io/#how-to-use and keep having an problem;

I have a node app (running version 3.0 alpha of express) and have the following:

app = express()

io = require('socket.io').listen app

I have edited the layout.jade and added:

script(src="/socket.io/socket.io.js")

I have also run npm install socket.io and confirmed that it starts fine on the server.

If I browse to any page, console keeps showing:

GET http://localhost:3000/socket.io/socket.io.js 404 (Not Found)

Anyone else experienced this issue?

  • 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-02T17:09:16+00:00Added an answer on June 2, 2026 at 5:09 pm

    Here are step by step instructions I just tested them

    express socket
    cd socket
    npm install
    npm install socket.io
    

    Add the following in app.js

    var io = require('socket.io').listen(app);
    

    Run

    node app
    

    In the console you should see

    info  - socket.io started
    

    In the browser go to

    http://localhost:3000/socket.io/socket.io.js

    You should see the raw JavaScript

    Edit:

    I’m also having problems with 3.0alpha1. Looks like a bug. Here is an ugly work around

    var fs = require('fs');
    app.get('/socket.io/socket.io.js', function(req, res) {
        fs.readFile('/PROJECT_HOME/node_modules/socket.io/lib/socket.io.js', function(error, content) {
            if (error) {
                res.writeHead(500);
                res.end();
            }
            else {
                res.writeHead(200, { 'Content-Type': 'text/javascript' });
                res.end(content, 'utf-8');
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this is a silly question, but I currently have the following and
Sorry if this question sounds a little silly, but I am not sure what
Sorry, I'm sure making a silly mistake, but did not work out. I'm compiling
sorry for the silly question, but i am stuck converting for example the following
Sorry for the silly question, but I am having a bit of trouble sending
I'm a beginner with this so sorry for the silly question, I have a
I am sorry if this is a silly question but I have been working
I have a problem, maybe a silly question, I want to store data in
Sorry if this is a silly question but I have been on web design
I am sorry if it seems a silly question to you, but I have

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.