nuxt: Excessive stack depth comparing types 'NuxtModule' and 'NuxtModule' + Type instantiation is excessively deep and possibly infinite.

Environment

  • Operating System: Windows_NT
  • Node Version: v14.17.1
  • Nuxt Version: 3.0.0-rc.2
  • Package Manager: yarn@1.22.5
  • Builder: vite
  • User Config: modules, css, build, runtimeConfig, tailwindcss
  • Runtime Modules: @nuxtjs/tailwindcss@5.0.4, @pinia/nuxt@0.1.9, @vueuse/nuxt@8.4.1, ./modules/storesAutoImports
  • Build Modules: -

Reproduction

https://github.com/florian-lefebvre/nuxt3-starter-medusa/tree/3e2b13d7a6d42542e80894298c6208176bc40577

Describe the bug

In the Nuxt config file, the tailwindcss config throws the following errors:

  • Excessive stack depth comparing types ‘NuxtModule<ModuleOptions>’ and ‘NuxtModule<ModuleOptions>’ [ts(2321)]
  • Type instantiation is excessively deep and possibly infinite [ts(2589)]

Additional context

Related: https://github.com/nuxt/framework/discussions/4754

Screenshot: image

Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 15 (5 by maintainers)

Most upvoted comments

I suspect you have multiple versions of nuxt/schema or kit installed. Try running npx nuxi upgrade --force to refresh your lockfile.

After nuxt v.3.2.3 and newer the problem appears again… https://github.com/nuxt/nuxt/issues/20159

Issue is happening in nuxt v 3.7.3 with package @dargmuesli/nuxt-cookie-control.

Edit: Issue was package caused duplicate @nuxt/kit with v 3.7.1

After updating to nuxt v3.2 this issue fixed itself.

+1 experiencing the same issue with only:

export default defineNuxtConfig({
  telemetry: true,
});

on:

  • Operating System: Darwin
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.2
  • Package Manager: yarn@1.17.3
  • Builder: vite
  • User Config: telemetry
  • Runtime Modules: -
  • Build Modules: -