满口金牙 2022-11-16 22:22 采纳率: 91.5%
浏览 63
已结题

Vue 代码出错信息请教

正常登录使用不会出错. 点刷新就报错 ,无页面,
各位判断一般是什么情况造成的.

自己写的出错好找, 内部错了,很晕

控制台出错信息
[Vue warn]: Unhandled error during execution of setup function 
  at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App> runtime-core.esm-bundler.js:38:16
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core 
  at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App> runtime-core.esm-bundler.js:38:16
[Vue warn]: Unhandled error during execution of watcher callback 
  at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App> runtime-core.esm-bundler.js:38:16
Uncaught (in promise) TypeError: vnode is null
    setVarsOnVNode runtime-dom.esm-bundler.js:726
    setVars runtime-dom.esm-bundler.js:717
    callWithErrorHandling runtime-core.esm-bundler.js:155
    callWithAsyncErrorHandling runtime-core.esm-bundler.js:164
    getter runtime-core.esm-bundler.js:1729
    run reactivity.esm-bundler.js:185
    flushPostFlushCbs runtime-core.esm-bundler.js:358
    flushJobs runtime-core.esm-bundler.js:403


网页出错的内部原码,不是自己写的
function warn(msg, ...args) {
    // avoid props formatting or warn handler tracking deps that might be mutated
    // during patch, leading to infinite recursion.
    pauseTracking();
    const instance = stack.length ? stack[stack.length - 1].component : null;
    const appWarnHandler = instance && instance.appContext.config.warnHandler;
    const trace = getComponentTrace();
    if (appWarnHandler) { // 
        callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [
            msg + args.join(''),
            instance && instance.proxy,
            trace
                .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`)
                .join('\n'),
            trace
        ]);
    }
    else {   // 可能是这里,但没明白意思
        const warnArgs = [`[Vue warn]: ${msg}`, ...args];
        /* istanbul ignore if */
        if (trace.length &&
            // avoid spamming console during tests
            !false) {
            warnArgs.push(`\n`, ...formatTrace(trace));
        }
        console.warn(...warnArgs);
    }
    resetTracking();
}



  • 写回答

2条回答 默认 最新

  • 一把编程的菜刀 2022-11-17 08:49
    关注

    并不是人家内部错,还是你写的东西有问题呀
    这个错误有很多原因的,其中一个你参考下面这个:
    https://zhangyu.blog.csdn.net/article/details/112599854

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 11月25日
  • 已采纳回答 11月17日
  • 创建了问题 11月16日

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效