It's all about
connecting the dots

Vue-Router 2: Uncaught RangeError: Maximum call stack size exceeded

Yeasterday, I found my front-end Vuejs program printed error like this:

Uncaught RangeError: Maximum call stack size exceeded
    at def (eval at <anonymous> (app.js:650), <anonymous>:342:30)
    at new Observer (eval at <anonymous> (app.js:650), <anonymous>:673:3)
    at observe (eval at <anonymous> (app.js:650), <anonymous>:749:10)
    at initData (eval at <anonymous> (app.js:650), <anonymous>:3196:3)
    at initState (eval at <anonymous> (app.js:650), <anonymous>:3121:5)
    at VueComponent.Vue._init (eval at <anonymous> (app.js:650), <anonymous>:3378:5)
    at new VueComponent (eval at <anonymous> (app.js:650), <anonymous>:3500:12)
    at createComponentInstanceForVnode (eval at <anonymous> (app.js:650), <anonymous>:1724:10)
    at init (eval at <anonymous> (app.js:650), <anonymous>:1734:43)
    at createComponent (eval at <anonymous> (app.js:650), <anonymous>:4174:9)

I was quickly establishing the basic structure of my new project at that time, and so there were many details I ignored. When I found the above error information, I was shocked. WTF is it?

After some attempts, I found the problem is that there were some Vuejs component named “RouterView” which has <router-view></router-view> inside them, and that was the cause. After I renamed their router component to names other than “RouterView”, the above error information disappeared.

赞(0) 打赏
版权声明:非商业用途转载请注明文章链接,商业用途转载请联系邮箱获取授权。
文章名称:《Vue-Router 2: Uncaught RangeError: Maximum call stack size exceeded》
文章链接:https://www.orzzone.com/vue-router-2-uncaught-rangeerror-maximum-call-stack-size-exceeded.html
商业联系:yakima.public@gmail.com
本站内容仅供个人学习交流,不做为任何投资、建议的参考依据,因此产生的问题需自行承担。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏