[英]How do I tell what file this error is coming from?
I'm somewhat new to next.js and I'm getting this error.我对 next.js 有点陌生,我收到了这个错误。 I've looked at every
<a>
tag I have in all my files and they all have a corresponding closing </a>
tag.我查看了所有文件中的每个
<a>
标记,它们都有相应的结束</a>
标记。 Am I not understanding this error properly?我没有正确理解这个错误吗? The only other thing I can think of is they want all my
<a>
tags to be wrapped inside of a <div>
but I don't know why that would be required.我能想到的唯一另一件事是他们希望我所有的
<a>
标签都包含在<div>
中,但我不知道为什么需要这样做。
Error: Warning: Expected server HTML to contain a matching <a>
in <div>
.错误:警告:预期服务器 HTML 在
<div>
中包含匹配的<a>
。
react-dom.development.js?ac89:67
Also where is this error being thrown from because they only reference they give is to a react-dom file that I think gets generated when next converts my code to something the browser can read (not 100% sure that's what the file is though)另外,这个错误是从哪里抛出的,因为他们只引用他们给出的是一个 react-dom 文件,我认为该文件是在下一次将我的代码转换为浏览器可以读取的内容时生成的(虽然不是 100% 确定文件是什么)
screenshot of error inside chrome dev tools console chrome 开发工具控制台中的错误截图
You can follow the DOM from `MyApp > App > Div > Navbar > Div > Link > a您可以从 `MyApp > App > Div > Navbar > Div > Link > a 跟随 DOM
I had this error.我有这个错误。 You need to wrap your Image in an tag so it looks like this
您需要将图像包装在标签中,使其看起来像这样
<Link>
<a>
<Image>
</a>
</Link>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.