「Next JS,IntelliJ IDEA」リンクを使用した場合のCannot解析警告


発生状況


コミットしようとすると、次のコードに警告が表示されます.どう見ても大丈夫なコードです.Cannot resolve directory ~およびCannot resolve file ~の警告は、postsが見つからないようです.
<Link href="/posts/first-post">
  this page!
</Link>

の原因となる


Implemented: additional references for Next.js projects, providing a resolution to js files in Link, form & other tags, relatively to "pages"directory. Since now we have proper references "unused"warning was gone. Renaming, moving files and code completion are also supported.
これは知識人祭自体の間違いです.最新バージョンに更新してキャッシュをクリアすれば解決!
正確には2022年1月版以降に解決された.

リファレンスリンク


https://youtrack.jetbrains.com/issue/WEB-48593