On Sun, Dec 30, 2012 at 8:13 AM, hashi101 <[email protected]> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en