-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic href
prints console warning in development mode
#16794
Comments
href
prints console in development modehref
prints console warning in development mode
Also having this issue |
Fixes a warning being logged to the console when using `href` with a dynamic path. Fixes #16794
Also having this issue. Closed but not fixed? |
@styxlab I just checked, it is fixed on |
I think this can solve your problem, tell me if the solution work |
I confirm this is fixed in (edit for search travellers: canary versions contain bugs. beware. also, it updates almost daily. expect quick bugfixes. checkout the latest version here: https://www.npmjs.com/package/next?activeTab=versions ) |
You can use it without warning like this : as is the path that will be rendered in the browser URL bar. |
Fixes a warning being logged to the console when using `href` with a dynamic path. Fixes vercel#16794
@tobyhinloopen can you tell me how to upgrade from '9.5.3' to '9.5.4-canary.21' without breaking anything ?
|
Note that the canary versions do contain bugs. You can try to destroy all temporary files (basically anything that can be generated) and try a clean start. You can destroy everything not tracked into source control using: # warning: this will delete EVERYTHING not in source control
git clean -fdx
# end of warning I upgraded by putting |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
When using the new support (v9.5.3) for dynamic href (ie,
<Link href="/pages/1">
when referring topages/[id].js
, a warning is printed to the console:To Reproduce
Here's a minimal repro: https://github.com/ztanner/next-dynamic-link-bug -- run
yarn dev
and observe the console on the index page.Expected behavior
No warnings should be printed
Screenshots
Dropping a debugger in the validator:
Additional context
The validation is coming from this section: https://github.com/vercel/next.js/blob/canary/packages/next/next-server/lib/router/router.ts#L566-L573 which implies
searchParams
is potentially valid URL option, and shouldn't be a warning?Happy to jump on a solution to this - just want to verify that either
searchParams
is valid, or alternatively it can be plucked out before being sent to the validator.The text was updated successfully, but these errors were encountered: