Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
now.distributeMessage is not a function
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Don  
View profile  
 More options May 17 2011, 10:54 pm
From: Don <don.newelem...@gmail.com>
Date: Tue, 17 May 2011 19:54:23 -0700 (PDT)
Local: Tues, May 17 2011 10:54 pm
Subject: now.distributeMessage is not a function
Greetings, following examples and getting error in Firebug console

now.distributeMessage is not a function

now.distributeMessage($("#text-input").val());

Getting this when I try to send a message. Thanks for any help.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don  
View profile  
 More options May 17 2011, 10:58 pm
From: Don <don.newelem...@gmail.com>
Date: Tue, 17 May 2011 19:58:52 -0700 (PDT)
Local: Tues, May 17 2011 10:58 pm
Subject: Re: now.distributeMessage is not a function
I also want to note this log when starting the server.

17 May 22:51:56 - socket.io ready - accepting connections
{ stack: [Getter/Setter],
  arguments: [ 'limits', undefined ],
  type: 'non_object_property_load',
  message: [Getter/Setter] }
TypeError: Cannot read property 'limits' of undefined
    at Object.initialize (/usr/lib/node/.npm/now/0.6.0/package/lib/
nowServerLib.js:297:48)
    at Object.<anonymous> (/Users/[REMOVED]/Sites/local_test/
server_now.js:12:22)
    at Module._compile (module.js:404:26)
    at Object..js (module.js:410:10)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at Array.<anonymous> (module.js:423:10)
    at EventEmitter._tickCallback (node.js:126:26)
could not connect to lb
{ stack: [Getter/Setter],
  arguments: undefined,
  type: undefined,
  message: 'Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED,
Connection refused' }
Error: Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED,
Connection refused
    at Socket.<anonymous> (/usr/lib/node/.npm/now/0.6.0/package/
node_modules/redis/index.js:120:28)
    at Socket.emit (events.js:64:17)
    at Array.<anonymous> (net.js:828:27)
    at EventEmitter._tickCallback (node.js:126:26)

On May 17, 10:54 pm, Don <don.newelem...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Darshan Shankar  
View profile   Translate to Translated (View Original)
 More options May 18 2011, 3:27 pm
From: Darshan Shankar <d.n.shan...@gmail.com>
Date: Wed, 18 May 2011 12:27:53 -0700
Local: Wed, May 18 2011 3:27 pm
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

Hey Don,

There was a bug in the nowjs on npm that has been fixed. Please uninstall
nowjs (npm uninstall now) and reinstall nowjs (npm install now).

Darshan

--
Darshan Shankar
www.nowjs.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don  
View profile  
 More options May 18 2011, 5:06 pm
From: Don <don.newelem...@gmail.com>
Date: Wed, 18 May 2011 14:06:45 -0700 (PDT)
Local: Wed, May 18 2011 5:06 pm
Subject: Re: now.distributeMessage is not a function
I uninstalled nowjs and re-installed. It seems to install the same
version. I could be wrong. I'm getting the same errors.

iMac:~ [REMOVED]$ npm uninstall now
npm info it worked if it ends with ok
npm info using n...@0.3.18
npm info using n...@v0.4.7
npm info preuninstall n...@0.6.0
npm info uninstall n...@0.6.0
npm info predeactivate n...@0.6.0
npm info deactivate n...@0.6.0
npm info postdeactivate n...@0.6.0
npm info postuninstall n...@0.6.0
npm info uninstall n...@0.6.0 complete
npm ok
iMac:~ [REMOVED]$ npm install now
npm info it worked if it ends with ok
npm info using n...@0.3.18
npm info using n...@v0.4.7
npm info preinstall n...@0.6.0
npm info install n...@0.6.0
npm info postinstall n...@0.6.0
npm info preactivate n...@0.6.0
npm info activate n...@0.6.0
npm info postactivate n...@0.6.0
npm info build Success: n...@0.6.0
npm ok

On May 18, 3:27 pm, Darshan Shankar <d.n.shan...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don  
View profile  
 More options May 18 2011, 5:30 pm
From: Don <don.newelem...@gmail.com>
Date: Wed, 18 May 2011 14:30:45 -0700 (PDT)
Local: Wed, May 18 2011 5:30 pm
Subject: Re: now.distributeMessage is not a function
This is the errors I'm getting. Thanks.

18 May 17:29:06 - socket.io ready - accepting connections
{ stack: [Getter/Setter],
  arguments: [ 'limits', undefined ],
  type: 'non_object_property_load',
  message: [Getter/Setter] }
TypeError: Cannot read property 'limits' of undefined
    at Object.initialize (/usr/lib/node/.npm/now/0.6.0/package/lib/
nowServerLib.js:297:48)
    at Object.<anonymous> (/Users/[REMOVED]/Sites/local_test/
server_now.js:11:31)
    at Module._compile (module.js:404:26)
    at Object..js (module.js:410:10)
    at Module.load (module.js:336:31)
    at Function._load (module.js:297:12)
    at Array.<anonymous> (module.js:423:10)
    at EventEmitter._tickCallback (node.js:126:26)
could not connect to lb
{ stack: [Getter/Setter],
  arguments: undefined,
  type: undefined,
  message: 'Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED,
Connection refused' }
Error: Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED,
Connection refused
    at Socket.<anonymous> (/usr/lib/node/.npm/now/0.6.0/package/
node_modules/redis/index.js:120:28)
    at Socket.emit (events.js:64:17)
    at Array.<anonymous> (net.js:828:27)
    at EventEmitter._tickCallback (node.js:126:26)

On May 18, 5:06 pm, Don <don.newelem...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don  
View profile  
 More options May 18 2011, 5:35 pm
From: Don <don.newelem...@gmail.com>
Date: Wed, 18 May 2011 14:35:24 -0700 (PDT)
Local: Wed, May 18 2011 5:35 pm
Subject: Re: now.distributeMessage is not a function
All I'm doing is starting the server, node server_now.js, and I get
the errors in terminal

This is the server_now.js

var fs = require('fs');
var server = require('http').createServer(function(req, response){
  fs.readFile('client_nowjs.html', function(err, data){
    response.writeHead(200, {'Content-Type':'text/html'});
    response.write(data);
    response.end();
  });

});

server.listen(8181);

var everyone = require('now').initialize(server);

everyone.connected(function(){
  console.log("Joined: " + this.now.name);

});

everyone.disconnected(function(){
  console.log("Left: " + this.now.name);

});

everyone.now.distributeMessage = function(message){
        everyone.now.receiveMessage(this.now.name, message);

};

On May 18, 5:30 pm, Don <don.newelem...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vladimir Dronnikov  
View profile  
 More options May 18 2011, 5:47 pm
From: Vladimir Dronnikov <dronni...@gmail.com>
Date: Thu, 19 May 2011 01:47:40 +0400
Local: Wed, May 18 2011 5:47 pm
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

>  message: 'Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED,

Seems like the team started on load balancer.
You should install https://github.com/antirez/redis and
https://github.com/mranney/node_redis.
The latter is available as `npm install redis`

Best regards,
--Vladimir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Darshan Shankar  
View profile  
 More options May 18 2011, 5:50 pm
From: Darshan Shankar <d.n.shan...@gmail.com>
Date: Wed, 18 May 2011 14:50:33 -0700
Local: Wed, May 18 2011 5:50 pm
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

Actually don't do that. The load balancer isn't meant to be in integrated
into nowjs 0.6.0, we made a mistake.

Give us a few minutes, we will fix nowjs and publish to npm soon. Sorry for
the bugs.

On Wed, May 18, 2011 at 2:47 PM, Vladimir Dronnikov <dronni...@gmail.com>wrote:

> >  message: 'Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED,

> Seems like the team started on load balancer.
> You should install https://github.com/antirez/redis and
> https://github.com/mranney/node_redis.
> The latter is available as `npm install redis`

> Best regards,
> --Vladimir

--
Darshan Shankar
www.nowjs.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Darshan Shankar  
View profile  
 More options May 18 2011, 5:58 pm
From: Darshan Shankar <d.n.shan...@gmail.com>
Date: Wed, 18 May 2011 14:58:20 -0700
Local: Wed, May 18 2011 5:58 pm
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

This has been fixed. Please reinstall NowJS.

Do "npm uninstall now" and "npm install now" again

On Wed, May 18, 2011 at 2:50 PM, Darshan Shankar <d.n.shan...@gmail.com>wrote:

--
Darshan Shankar
www.nowjs.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay Are Galinada  
View profile   Translate to Translated (View Original)
 More options Jul 24 2012, 11:57 pm
From: Jay Are Galinada <jayaregalin...@gmail.com>
Date: Tue, 24 Jul 2012 20:57:55 -0700 (PDT)
Local: Tues, Jul 24 2012 11:57 pm
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

I still get the error

TypeError: now.distributeMessage is not a function


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nate Morse  
View profile  
 More options Jul 25 2012, 9:14 am
From: Nate Morse <morse.n...@gmail.com>
Date: Wed, 25 Jul 2012 09:14:23 -0400
Local: Wed, Jul 25 2012 9:14 am
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

I am missing your thread of conversation on this,
Would you share the code/context that is causing this error? Or a simple
(server and client code) example that exhibits this TypeError.
--Thanks

On Tue, Jul 24, 2012 at 11:57 PM, Jay Are Galinada <jayaregalin...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay Are Galinada  
View profile  
 More options Jul 26 2012, 4:49 am
From: Jay Are Galinada <jayaregalin...@gmail.com>
Date: Thu, 26 Jul 2012 01:49:31 -0700 (PDT)
Local: Thurs, Jul 26 2012 4:49 am
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

Noong Miyerkules, Hulyo 25 2012 21:14:23 UTC+8, si Nate ay sumulat:

> I am missing your thread of conversation on this,
> Would you share the code/context that is causing this error? Or a simple
> (server and client code) example that exhibits this TypeError.
> --Thanks

Visit http://jayare.swakfm.com:8000
I run the nowjs in port 8000 and when I want to add text/message I got this
kind of error in the console log
I used the example in the video.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nate Morse  
View profile  
 More options Jul 26 2012, 9:59 am
From: Nate Morse <morse.n...@gmail.com>
Date: Thu, 26 Jul 2012 09:59:57 -0400
Local: Thurs, Jul 26 2012 9:59 am
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

Your demo actually works for me, so unless you have fixed something, it
might be an intermittent timing problem.
You might try waiting for the "now.ready" event, before you do start up all
your now code.

// see now.ready( function () { // added to wait for the now object to be
fully initialized.

$(function(){
    now.ready( function () { // added to wait for the now object to be
fully initialized.
        now.name = prompt("My name is?", "");
        console.log(now);
        now.receiveMsg = function(name, msg){
            $("<div></div>").text(name +" : "+ msg).appendTo("#msg");
        };
        $("#send").click(function(){
            var text = $("#text").val();
            now.distributeMsg(text);
            $("#text").val("");
        });
    });

})

On Thu, Jul 26, 2012 at 4:49 AM, Jay Are Galinada
<jayaregalin...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay Are Galinada  
View profile  
 More options Jul 27 2012, 5:50 am
From: Jay Are Galinada <jayaregalin...@gmail.com>
Date: Fri, 27 Jul 2012 02:50:40 -0700 (PDT)
Local: Fri, Jul 27 2012 5:50 am
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

It seems like it doesn't work that way, I've tried everything what I can
do, but still, it doesn't work.
I also used the code above but the prompt function doesn't run.

Noong Huwebes, Hulyo 26 2012 21:59:57 UTC+8, si Nate ay sumulat:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nate Morse  
View profile  
 More options Jul 27 2012, 10:17 am
From: Nate Morse <morse.n...@gmail.com>
Date: Fri, 27 Jul 2012 10:17:54 -0400
Local: Fri, Jul 27 2012 10:17 am
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

--strange-- that it does not work for you. Using FF and Chrome it works for
me, with no errors.
Are you seeing any errors?

On Fri, Jul 27, 2012 at 5:50 AM, Jay Are Galinada
<jayaregalin...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay Are Galinada  
View profile  
 More options Jul 27 2012, 10:41 pm
From: Jay Are Galinada <jayaregalin...@gmail.com>
Date: Fri, 27 Jul 2012 19:41:34 -0700 (PDT)
Local: Fri, Jul 27 2012 10:41 pm
Subject: Re: [NowJS] Re: now.distributeMessage is not a function

Yeah, no errors and not running, and the prompt function doesn't execute in
the first load as expected. However, the polling is executed every time.
I'm using Firefox v14.0.1 and Google Chrome v20.0.1132.57 m
This is my nodejs server configuration

var fs = require("fs");
var http = require("http");
var nowjs = require("now");
server = http.createServer(function(req, res){
    fs.readFile("index.html", function(err, data){
        res.writeHead(200, {"Content-Type": "text/html"});
        res.write(data);
        res.end();
    });

});

server.listen(8000);

// nowjs here

var everyone = nowjs.initialize(server);
console.log(everyone);
console.log(server.listen());
everyone.now.distributeMsg = function(msg){
    everyone.now.receiveMsg(this.now.name, msg);

};

Noong Biyernes, Hulyo 27 2012 22:17:54 UTC+8, si Nate ay sumulat:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »