Getting Invalid Link error when using with Next.js 13

hey! Im having this weird issue when creating a button w/ a link. I receive the following error: Error: Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.

Any advice to fix this? If you need more info, let me know

Hey @dark_lemur! I’m sorry, this seems to be an issue of Plasmic with the just-launched Next.js 13 (which changed the behavior of Link to not allow a inside the Link component: https://nextjs.org/blog/next-13#breaking-changes). We will work to fix it and let you know as soon as it’s fixed.

ah this makes sense! I tried running npx @next/codemod new-link . as directed by the terminal, but It still didnt fix the issue. Thanks for the quick response!

Yeah; the codemod doesn’t fix the issue because it’s not in your code - it’s our @plasmicapp/react-web package that is instantiating the next/link components. But no worries, it should be an easy fix from our side.

Hey @dark_lemur! This should now be fixed. If you’re using loader, you might need to publish a new version of your Plasmic project. If you’re using codegen, update @plasmicapp/react-web to 0.2.115. Let me know if it works or if you find any issues!

it works! thanks!