If you use Storybook with Next.js and have components using next/link
you'll have to mock next/router
the same you would for testing with Jest or others. Simply create a file with the mock router as shown below and import it in your Storybook config.
This is based on some information from an issue on Next.js:
For people working with Next 9.4.0 or higher, make the prefetch function return a promise
to prevent the following error:
link.js:14 Uncaught TypeError: Cannot read property 'catch' of undefined at Link.prefetch (link.js:14)