# Nuxt route resolve

**URL:** <https://community.prismic.io/t/nuxt-route-resolve/5314>\
**Category:** Developing with Prismic\
**Tags:** nuxtjs\
**Created:** [May 11, 2021, 11:46am UTC](https://community.prismic.io/t/nuxt-route-resolve/5314 "2021-05-11T11:46:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![victorthevictoriousv](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@victorthevictoriousv](https://community.prismic.io/u/victorthevictoriousv)\
**Post date:** [May 11, 2021, 11:46am UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/1 "2021-05-11T11:46:37Z")

</div>

Im trying to customize my routes on my about-me page.

```auto
        modules: [
            // https://go.nuxtjs.dev/pwa
            "@nuxtjs/pwa",
            "nuxt-webfontloader",
            "@nuxtjs/svg",
            [
              "@nuxtjs/prismic",
              {
                endpoint: "https://xxx.cdn.prismic.io/api/v2",
                apiOptions: {
                  routes: [
                    {
                      type: "page",
                      path: "/:uid",
                    },
                    {
                      type: "about-type",
                      path: "/about-me/about-type",
                    },
                   {
                      type: "about-type2",
                      path: "/about-me/about-type2",
                    },

               }
]

```

But the url's i get looks like this "/about". It gets cut at the hyphen. It should be /about-me/about-type2  
Why do they get cut at the hyphen?

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [May 11, 2021, 12:47pm UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/3 "2021-05-11T12:47:58Z")

</div>

Hello @victorthevictoriousv

Thanks for posting this question to us.

To use route-resolver, you need Slicemachine activated on their repository. Can you please send me the URL of your repository?

I am looking forward to hearing from you back.

Thanks,

Priyanka

---

<div class="post-metadata">

**Author:** ![victorthevictoriousv](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@victorthevictoriousv](https://community.prismic.io/u/victorthevictoriousv)\
**Post date:** [May 11, 2021, 6:07pm UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/6 "2021-05-11T18:07:31Z")

</div>

Hey 😃  
This one you mean?  
[https://tecomatic.cdn.prismic.io/api/v2](https://tecomatic.cdn.prismic.io/api/v2)

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [May 12, 2021, 8:57am UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/7 "2021-05-12T08:57:16Z")

</div>

Hi Victor,

This is a known issue with the Route Resolver and hyphens that the team has started to fix last week.

We are tracking the issue and will update everyone below when the fix is pushed:

> [@Generate: \[error\] Cannot read property 'data' of undefined](https://community.prismic.io/t/generate-error-cannot-read-property-data-of-undefined/2385/32):
>
> Hey @maxvdschee , I discussed this with Lucie and she explained to me what's going on. So because we removed the apiOptions for the route resolver the project then falls back on the default nuxt.js route generator, which creates the routes by crawling links. So because the documents above aren't linked anywhere in your project their routes aren't generated by Nuxt.js. This was something that was overcome previously by our route resolver as it does a query server-side for all Prismic documen…

Thanks.

---

<div class="post-metadata">

**Author:** ![jake](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jake/32/5120_2.png) [@jake](https://community.prismic.io/u/jake)\
**Post date:** [May 12, 2021, 9:57am UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/8 "2021-05-12T09:57:58Z")

</div>

If you plan to have the 'about-type' as a UID you can overcome the hyphen issue on 'about-me' by creating a relationship back to the parent 'about-me' document and using a resolver.

For example, your uid page 'about type' has a relationship field 'link\_to\_about' that you link to 'about-me' in Prismic.

Then you can use the resolver like so:

```
{
  type: "about-type",
  path: "/:about/:uid",
  resolvers: {
    about: "link_to_about"
  }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [May 18, 2021, 8:43pm UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/9 "2021-05-18T20:43:52Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 4:18pm UTC](https://community.prismic.io/t/nuxt-route-resolve/5314/10 "2021-12-09T16:18:44Z")

</div>


