Nowjs:[RangeError:超出最大调用堆栈大小] [英] Nowjs: [RangeError: Maximum call stack size exceeded]

查看:124
本文介绍了Nowjs:[RangeError:超出最大调用堆栈大小]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在端口8080上启动服务器时,它不会给我一个错误,但当我尝试浏览 http:// localhost:8080 / nowjs / now.js 服务器引发错误:

When I start the server on port 8080 it doesn't give me an error, but when I am trying to browse the http://localhost:8080/nowjs/now.js the server raises an error:

[RangeError:超出最大调用堆栈大小]

undefined

我尝试使用socket.io并且工作正常。

I tried the same with socket.io and it worked fine.

推荐答案

嗯,如果now.js使用date.js,也许你的问题在于这里。链接说的是date.js尝试将toString设置为Date原型,但是当已定义toString时,您将获得其他答案中提到的循环引用

Hmm, if now.js uses date.js, maybe your issue lies here. What the link says is that date.js tries to set a toString to Date prototype, but when toString is already defined, you get the circular reference mentioned in the other answers.

基本上,他们说在date.js中,你改变了

Basically, they say that in date.js, you change

Date.prototype._toString=Date.prototype.toString

to

if(Date.prototype._toString==undefined) {Date.prototype._toString=Date.prototype.toString;}

我希望它会帮助某人。它帮助了我。

I hope it will help someone. It helped me.

这篇关于Nowjs:[RangeError:超出最大调用堆栈大小]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆