node.js - Nowjs : running node and nowjs on a hosted server - error : maximum call stack size exceeded -


hello fellow stackers.

i implementing node.js , nowjs on website working on. started developing site weeks ago on localhost , working fine. transferred files couple of days ago cloud server hosted rackspace ubuntu 12.04 lts (precise pangolin) os.

now cant simple chat example on nowjs home page work! keep getting following error when try run server side script :

[rangeerror: maximum call stack size exceeded]

there no recursive loops in code , have tried looking solutions problem on internet no luck.

here 2 example files - c/p chat/helloworld example @ official nowjs site. (http://nowjs.com/doc/example)

server.js

var html = require('fs').readfilesync(__dirname+'/helloworld.html'); var server = require('http').createserver(function(req, res){   res.end(html); }); server.listen(8080);  var nowjs = require("now"); var = nowjs.initialize(server);  everyone.now.distributemessage = function(message){   everyone.now.receivemessage(this.now.name, message); }; 

helloworld.html

<!doctype html> <html lang="en"> <head> <title>nowjs test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script src="/nowjs/now.js"></script>  <script> $(document).ready(function(){    now.receivemessage = function(name, message){     $("#messages").append("<br>" + name + ": " + message);   }    $("#send-button").click(function(){     now.distributemessage($("#text-input").val());     $("#text-input").val("");   });    now.name = prompt("what's name?", "");  }); </script> </head>  <body>   <div id="messages"></div>   <input type="text" id="text-input">   <input type="button" value="send" id="send-button"> </body> </html> 

my questions :

  1. has had same problem running nowjs on hosted web server?
  2. are there dependencies might not aware of when running nowjs on hosted web server?

thank you.

i resolved this. needed reinstallation of node recent stable version(v0.4.12).


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -