JEverhart383 / astro-wordpress-starter

150 stars 31 forks source link

siteNav error #12

Open djmtype opened 1 year ago

djmtype commented 1 year ago

Randomly, when running Astro 2.10.9, I get this error:

Transform failed with 1 error:
/Volumes/Evo/Sites/astro-wordpress-starter/src/components/SiteNav.astro?astro&type=script&index=0&lang.ts:2:0: ERROR: Unexpected "const"

components/SiteNav.astro?astro&type=script&index=0&lang.ts:2

All of my menu items have urls and names, so I'm unsure why this happens. My nav name returns as PRIMARY.

When I check the schema in the GraphQL Playground, the fields return successfully.

{
                menus(where: {location: PRIMARY}) {
                  nodes {
                    name
                    menuItems {
                        nodes {
                            uri
                            url
                            order
                            label
                        }
                    }
                  }
                }
                generalSettings {
                    title
                    url
                    description
                }
            }