You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs promise that there is a router.push() method to update current URL in browser without making an Inertia request, but accessing that method results in:
chunk-U3LI7FBV.js?v=c55547f8:2332 Uncaught TypeError: router.push is not a function
at Proxy.setCollectionRoute (Collections.vue:44:12)
at onClick (Collections.vue:67:29)
at chunk-U3LI7FBV.js?v=c55547f8:11231:45
at callWithErrorHandling (chunk-U3LI7FBV.js?v=c55547f8:2263:19)
at callWithAsyncErrorHandling (chunk-U3LI7FBV.js?v=c55547f8:2270:17)
at callWithAsyncErrorHandling (chunk-U3LI7FBV.js?v=c55547f8:2281:19)
at HTMLButtonElement.invoker (chunk-U3LI7FBV.js?v=c55547f8:11202:5)
While other methods, e.g. visit(), work on the router object, so this is not a configuration issue.
Thanks for the report! I extensively tested this with Vue 3, React, and Svelte but was unable to reproduce the issue.
Please ensure that you're importing the router only from @inertiajs/vue3 and check your package.json for any duplicate @inertia/* package installations.
It sounded like you might have both @inertiajs/core and @inertiajs/vue3 installed, which shouldn't be necessary since @inertiajs/vue3 already depends on @inertiajs/core. If both are present, try uninstalling @inertiajs/core, as using both could be causing the issue.
If that doesn’t resolve it, try deleting your node_modules directory and reinstalling all dependencies, as this often fixes corrupted package installations.
Version:
@inertiajs/core
version: 2.0.3@inertiajs/vue3
version: 2.0.3Describe the problem:
Docs promise that there is a
router.push()
method to update current URL in browser without making an Inertia request, but accessing that method results in:While other methods, e.g.
visit()
, work on the router object, so this is not a configuration issue.Steps to reproduce:
In a Vue3 typescript SFC:
The text was updated successfully, but these errors were encountered: