robots icon indicating copy to clipboard operation
robots copied to clipboard

help: Typecheck fails after updating to v5.3.0 at `NitroRouteConfig`

Open dredav opened this issue 6 months ago • 1 comments

📚 What are you trying to do?

First of all: Thanks for creating and maintaining this Nuxt module!

After updating some of the dependencies in our Nuxt project (we're using Nuxt v3), we encountered some type-checking errors when running nuxt typecheck. We traced the issue to the @nuxtjs/robots dependency, the errors started appearing after upgrading from version @5.2.11 to @5.3.0.

nuxt.config.ts:185:9 - error TS2353: Object literal may only specify known properties, and 'ssr' does not exist in type 'NitroRouteConfig'.

185         ssr: false,
            ~~~

We defined the SSR pages as documented in the Nuxt documentation here:

  nitro: {
    routeRules: {
      '/books/**': { ssr: true },
    },
  },

🔍 What have you tried?

No response

ℹ️ Additional context

Downgrading the package to @5.2.11 works for now, but I'm quite sure this type change wasn't intended in @5.3.0.

dredav avatar Jul 24 '25 11:07 dredav

related pr which likely broke it https://github.com/nuxt-modules/robots/pull/212

will try fix properly soon

harlan-zw avatar Jul 31 '25 10:07 harlan-zw