[NEXT-1203] Can't use external link with next/link
and typedRoutes: true
#49825
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 16.20.0 npm: 8.19.4 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.3-canary.0 eslint-config-next: 13.4.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4
Which area(s) of Next.js are affected? (leave empty if unsure)
Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue
https://github.com/jahirfiquitiva/next-link-typed-error/
To Reproduce
experimental.typedRoutes
innext.config.js
Describe the Bug
When setting
experimental.typedRoutes
totrue
innext.config.js
, and using external URLs withnext/link
, a type error is shown, which can only be fixed by usingas Route
.Error logs: https://vercel.com/jahirfiquitiva/next-link-typed-error/9VkAtcfToKfdMMzxKq2ZM8x5f7yY
Possibly related: #47689
Expected Behavior
No error should be shown when using an external link, and it should be considered acceptable.
Should work normally as it does without
typedRoutes
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
NEXT-1203
The text was updated successfully, but these errors were encountered: