FAQ
I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
socket.io-client-1.0 packages. And put it in node_modules folder. Changed
"socket.io-client" to "socket.io.client-1.0" in some files, because they
except the first name. And then I run sample application:

var io = require('socket.io-1.0')(7001);

io.on('connection', function(socket){
socket.on('event', function(data){});
socket.on('disconnect', function(){});
});

output was full of not installed modules, so I installed them up, and now,
when I run code above, get this:

io.on('connection', function(socket){
^
TypeError: Object #<Server> has no method 'on'
at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)

it should work. What i've done wrong?

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Martin Cooper at Dec 30, 2012 at 4:22 pm

    On Sun, Dec 30, 2012 at 8:13 AM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder.

    What's the reason you're not just using npm to install this?

    It sounds like you are downloading the tarballs manually and then just
    expanding them. That's not enough for many packages. Even if you download
    the tarballs, you'll still need to use npm to install the packages (i.e.
    'npm install <tarball>'), so that npm can run all the right scripts at the
    right points in the installation process, etc.

    --
    Martin Cooper


    Changed "socket.io-client" to "socket.io.client-1.0" in some files,
    because they except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and now,
    when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 30, 2012 at 4:28 pm
    Martin, i can't install socket.io 1.0 from NPM because socket.io 1.0 isn't
    there yet :) the latest version in NPM is 0.9.13


    2012/12/30 Martin Cooper <mfncooper@gmail.com>
    On Sun, Dec 30, 2012 at 8:13 AM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder.

    What's the reason you're not just using npm to install this?

    It sounds like you are downloading the tarballs manually and then just
    expanding them. That's not enough for many packages. Even if you download
    the tarballs, you'll still need to use npm to install the packages (i.e.
    'npm install <tarball>'), so that npm can run all the right scripts at the
    right points in the installation process, etc.

    --
    Martin Cooper


    Changed "socket.io-client" to "socket.io.client-1.0" in some files,
    because they except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Nuno Job at Dec 30, 2012 at 4:54 pm
    Use npm.

    Nuno

    Sent from my iPhone
    On Dec 30, 2012, at 4:13 PM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and socket.io-client-1.0 packages. And put it in node_modules folder. Changed "socket.io-client" to "socket.io.client-1.0" in some files, because they except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 30, 2012 at 4:55 pm
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and now,
    when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • José F. Romaniello at Dec 30, 2012 at 4:57 pm
    npm install gitrepostiroy#branch


    2012/12/30 Kamil Krzyszczuk <krzyszczukkamil@gmail.com>
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 30, 2012 at 5:02 pm
    there isn't socket.io 1.0 in npm..
    even npm install socket.io@1.0 or npm install socket.io#1.0 says same,
    there is not 1.0, latest one is 0.9.13.


    2012/12/30 José F. Romaniello <jfromaniello@gmail.com>
    npm install gitrepostiroy#branch


    2012/12/30 Kamil Krzyszczuk <krzyszczukkamil@gmail.com>
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Martin Cooper at Dec 30, 2012 at 5:21 pm

    On Sun, Dec 30, 2012 at 8:55 AM, Kamil Krzyszczuk wrote:

    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.
    As I said in my previous post, you can use npm to install it from the
    tarball. That is, "use npm", as Nuno said, or "npm install
    gitrepostiroy#branch", as Jose said, are *not* the same as "install from
    the registry". We understand you can't install from the registry. We're
    trying to give you workable alternatives. :)

    --
    Martin Cooper


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 30, 2012 at 5:31 pm
    Sry for my missunderstanding :) didn't know that there is official registry
    and options for others. So i tried it:

    npm install git://github.com/LearnBoost/socket.io.git

    but this installed just a 0.9.11 version. Maybe I copied wrong link, this
    is 1.0 branch:
    https://github.com/LearnBoost/socket.io/tree/1.0

    can someone look at it and say where is a link that should be to copied?


    2012/12/30 Martin Cooper <mfncooper@gmail.com>

    On Sun, Dec 30, 2012 at 8:55 AM, Kamil Krzyszczuk <
    krzyszczukkamil@gmail.com> wrote:
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.
    As I said in my previous post, you can use npm to install it from the
    tarball. That is, "use npm", as Nuno said, or "npm install
    gitrepostiroy#branch", as Jose said, are *not* the same as "install from
    the registry". We understand you can't install from the registry. We're
    trying to give you workable alternatives. :)

    --
    Martin Cooper


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • José F. Romaniello at Dec 30, 2012 at 7:20 pm
    I told you: npm install git repository#branch

    but you didnt put the branch name :)


    2012/12/30 Kamil Krzyszczuk <krzyszczukkamil@gmail.com>
    Sry for my missunderstanding :) didn't know that there is official
    registry and options for others. So i tried it:

    npm install git://github.com/LearnBoost/socket.io.git

    but this installed just a 0.9.11 version. Maybe I copied wrong link, this
    is 1.0 branch:
    https://github.com/LearnBoost/socket.io/tree/1.0

    can someone look at it and say where is a link that should be to copied?


    2012/12/30 Martin Cooper <mfncooper@gmail.com>

    On Sun, Dec 30, 2012 at 8:55 AM, Kamil Krzyszczuk <
    krzyszczukkamil@gmail.com> wrote:
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.
    As I said in my previous post, you can use npm to install it from the
    tarball. That is, "use npm", as Nuno said, or "npm install
    gitrepostiroy#branch", as Jose said, are *not* the same as "install from
    the registry". We understand you can't install from the registry. We're
    trying to give you workable alternatives. :)

    --
    Martin Cooper


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 <krzyszczukkamil@gmail.com>
    wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 30, 2012 at 6:52 pm
    worked, big thanks :)


    2012/12/30 José F. Romaniello <jfromaniello@gmail.com>
    I told you: npm install git repository#branch

    but you didnt put the branch name :)


    2012/12/30 Kamil Krzyszczuk <krzyszczukkamil@gmail.com>
    Sry for my missunderstanding :) didn't know that there is official
    registry and options for others. So i tried it:

    npm install git://github.com/LearnBoost/socket.io.git

    but this installed just a 0.9.11 version. Maybe I copied wrong link, this
    is 1.0 branch:
    https://github.com/LearnBoost/socket.io/tree/1.0

    can someone look at it and say where is a link that should be to copied?


    2012/12/30 Martin Cooper <mfncooper@gmail.com>

    On Sun, Dec 30, 2012 at 8:55 AM, Kamil Krzyszczuk <
    krzyszczukkamil@gmail.com> wrote:
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.
    As I said in my previous post, you can use npm to install it from the
    tarball. That is, "use npm", as Nuno said, or "npm install
    gitrepostiroy#branch", as Jose said, are *not* the same as "install from
    the registry". We understand you can't install from the registry. We're
    trying to give you workable alternatives. :)

    --
    Martin Cooper


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 <krzyszczukkamil@gmail.com>
    wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 30, 2012 at 7:30 pm
    worked, big thanks :)

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Nuno Job at Dec 31, 2012 at 3:42 am
    Have you considered why the repo is not on npm yet?

    The author choose not to publish it yet, I would advise you to to reach out
    and ask why at least before using in production.

    I think the appropriate workflow would be something like:

    * If you are a developer of socket.io you already use and know about `npm
    link`
    * If you have a problem that was patched in master but cant wait for it to
    be published, apply a patch to latest stable version. Tell that to the
    socket.io folks so they can release a stable version
    * If you want to use the bleeding edge version in production, when the
    author deliberately choose not to publish, probably a bad idea.

    This is all hypothetical, but then again :)

    Nuno

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Kamil Krzyszczuk at Dec 31, 2012 at 12:04 pm
    Just for test how it work right now.


    2012/12/31 Nuno Job <nunojobpinto@gmail.com>
    Have you considered why the repo is not on npm yet?

    The author choose not to publish it yet, I would advise you to to reach
    out and ask why at least before using in production.

    I think the appropriate workflow would be something like:

    * If you are a developer of socket.io you already use and know about `npm
    link`
    * If you have a problem that was patched in master but cant wait for it to
    be published, apply a patch to latest stable version. Tell that to the
    socket.io folks so they can release a stable version
    * If you want to use the bleeding edge version in production, when the
    author deliberately choose not to publish, probably a bad idea.

    This is all hypothetical, but then again :)

    Nuno

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Nuno Job at Dec 31, 2012 at 3:23 pm
    Cool, for something like that you can do:

    ```
    # clone
    git clone ...
    cd socketio
    # get whatever tag your interested in
    git checkout v1.0.0
    npm link
    ```

    On the other folder where you need to try it out:

    ```
    npm link socket.io
    ```

    Done :)

    Nuno

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Martin Cooper at Dec 30, 2012 at 7:31 pm

    On Sun, Dec 30, 2012 at 9:31 AM, Kamil Krzyszczuk wrote:

    Sry for my missunderstanding :) didn't know that there is official
    registry and options for others. So i tried it:

    npm install git://github.com/LearnBoost/socket.io.git

    but this installed just a 0.9.11 version. Maybe I copied wrong link, this
    is 1.0 branch:
    https://github.com/LearnBoost/socket.io/tree/1.0

    can someone look at it and say where is a link that should be to copied?
    You need to add the tag to the URL. You'll also need to install the client
    first. Try this:

    $ npm install git://github.com/LearnBoost/socket.io-client.git#1.0
    $ npm install git://github.com/LearnBoost/socket.io.git#1.0

    It worked for me.

    --
    Martin Cooper


    2012/12/30 Martin Cooper <mfncooper@gmail.com>

    On Sun, Dec 30, 2012 at 8:55 AM, Kamil Krzyszczuk <
    krzyszczukkamil@gmail.com> wrote:
    Nuno, read posts. Socket.io 1.0 isn't present in NPM yet.
    As I said in my previous post, you can use npm to install it from the
    tarball. That is, "use npm", as Nuno said, or "npm install
    gitrepostiroy#branch", as Jose said, are *not* the same as "install from
    the registry". We understand you can't install from the registry. We're
    trying to give you workable alternatives. :)

    --
    Martin Cooper


    2012/12/30 Nuno Job <nunojobpinto@gmail.com>
    Use npm.

    Nuno

    Sent from my iPhone

    On Dec 30, 2012, at 4:13 PM, hashi101 <krzyszczukkamil@gmail.com>
    wrote:

    I try to install Socket.io 1.0,so I downloaded socket.io-1.0 and
    socket.io-client-1.0 packages. And put it in node_modules folder. Changed
    "socket.io-client" to "socket.io.client-1.0" in some files, because they
    except the first name. And then I run sample application:

    var io = require('socket.io-1.0')(7001);

    io.on('connection', function(socket){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
    });

    output was full of not installed modules, so I installed them up, and
    now, when I run code above, get this:

    io.on('connection', function(socket){
    ^
    TypeError: Object #<Server> has no method 'on'
    at Object.<anonymous> (/usr/home/user/programs/soc10/soc.js:3:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback
    (node.js:244:9)

    it should work. What i've done wrong?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedDec 30, '12 at 4:13p
activeDec 31, '12 at 3:23p
posts16
users4
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase