Next.js Discord

Discord Forum

Error with <Link> Component

Unanswered
Philippine Crocodile posted this in #help-forum
Open in Discord
Philippine CrocodileOP
I've been working with nextjs 16.0.2 for the past couple days, recently I noticed that my dev server was crashing much more frequently and was curious on why, I kept on getting the error

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Upon more digging I noticed that the error was caused when I have a <Link> component that links to a 404 page. To recreate this what I've done was link to a 404 page, click the link, then try navigate to the previous page in the browser and my computer starts no joke heating up followed by the development server crashing.

Not too sure if this could be an error with next or if it's just my neglect, but I wasn't sure where to go with this issue.

1 Reply

Masai Lion
I'm getting the same issues on local, plus sometimes clicking on a <Link> on the standalone output doesn't take me anywhere unless I refresh. I think it's an issue on the last version the Next team has to resolve