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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:41:29+00:00 2026-06-14T07:41:29+00:00

I try to create an Azure WorkerRole with Node.js. This work’s without any Problems.

  • 0

I try to create an Azure WorkerRole with Node.js. This work’s without any Problems. If I add socket.io, the Node.js Server don’t start if I run in the Emulator. If I start the node.exe with my application JavaScript file, it works.

First I thought, I don’t copy the socket.io modules so within the Emulator Node.js could not load the socket.io Module. But I copy all, and the error message shown is not the one, if a module is missing.

The error message on the console looks like this:

...\node_modules\socket.io\lib\Manager.js:104
Server.on<'error', function(err) {
TypeError: Object 12345 has no method 'on'

My Node.js code:

var port = process.env.port || 12345;
var io = require('socket.io').listen(port);
// start socket
io.sockets.on('connection', function (socket) {
    socket.emit('news', { hello: 'world' });

    // create new push session
    socket.on('cid', function (cid) {
        console.log(cid);
    });
});
console.log("Server running at port %d", 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-14T07:41:30+00:00Added an answer on June 14, 2026 at 7:41 am

    Use var port = parseInt(process.env.port) || 12345. According to the code, the first parameter to listen is only treated as a port if its type is number, but what you get from the environment is a string.

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

Sidebar

Related Questions

I want to try create something like Zend's Server Pagecache. What I want to
I try to create donate via PayPal button and add custom select with amount.
Im try to create a spinner dynamically on press of a button. this is
When try to create a new API request with the Windows Azure new Bing
At the moment I have this: try{ // Create file FileWriter fstream = new
snippet from The Server code : public void run() { try { // Create
I am following this tutorial . All is going well until I try create
I try to create an application that is able to run in Windows Azure
I try create method for get the connection string value but without value for
My webapplication hosted on windows azure, needs to communicate with TFS Server. When any

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.