Router.push( { path } ) works, while router.push( { name and params } ) does not

This works:

  router.push({
    path: "/resources/" + resourceName,
    query: { dates: resourceBrowser.filters.dates }
  })

Using name and params doesn’t:

  router.push({
    name: "resources", 
    params: { resourceName }, 
    query: { dates: resourceBrowser.filters.dates }
  })

It causes an error:

Discarded invalid param(s) "resourceName" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details. vue-router.mjs:35:17

Route is defined like this:

    {
      path: "/resources/:resourceName",
      name: "resource",
      component: () => import("../views/Resource.vue"),
    },
    {
      path: "/resources/:resourceName/manage",
      name: "manage-resource",
      component: () => import("../views/ManageResource.vue"),
    },

I included the subsequent route because I’m using the same parameter name there and wondered if that might cause some interference.

Maybe I’m overlooking something obvious? (It’s late, please excuse me in that case)

Thanks for hints

You named your path “resource”, not “resources”

router.push({
    name: "resources", /* <-- this should be "resource" */
    params: { resourceName }, 
    query: { dates: resourceBrowser.filters.dates }
  })

Thank you! :monkey_face: