Next.js Discord

Discord Forum

Ignore/silence Next.js deprecation warning?

Unanswered
Luke posted this in #help-forum
Open in Discord
Hello, I am working on a codebase that uses Solito with Next.js.

Solito still uses the deprecated legacyBehavior prop from next/link. Now, the Next.js error is following me in my logs and on every page. I'm surprised I've never ran into anything like this before, but is there a way to suppress these warnings?

4 Replies

@Anay-208 | Ping in replies Its a good idea to create a issue in solito github repo
Yeah - they know about it already, just was looking to see if there was a way to suppress this in the meantime.
im afraid you need to patch the next package to remove the line where the warning is logged. the nextjs source code doesn't offer a way to force-opt out
either patch next to remove the warning
or patch solito to fix the warning