Invalid href passed to router error after fresh installed create-next-app

后端 未结 6 568
盖世英雄少女心
盖世英雄少女心 2021-02-05 18:02

After installed nextjs app on my local machine using create-next-app I get this error in console Invalid href passed to router.

Does anyone kno

6条回答
  •  灰色年华
    2021-02-05 18:31

    According to this document https://github.com/vercel/next.js/blob/master/errors/invalid-href-passed.md

    Possible Ways to Fix It Look for any usage of next/link or next/router that is being passed a non-internal href and replace them with either an anchor tag () or window.location.href = YOUR_HREF.

提交回复
热议问题