dargmuesli / nuxt-cookie-control

A highly configurable cookie banner for Nuxt.
MIT License
242 stars 45 forks source link

Excessive stack depth comparing types 'NuxtModule<ModuleOptions>' and 'NuxtModule<ModuleOptions>'. #142

Closed matteomejia closed 1 year ago

matteomejia commented 1 year ago

Environment

Reproduction

Create a new Nuxt 3 project with nuxi and add @dargmuesli/nuxt-cookie-control to the modules.

Describe the bug

Installing the module in a project with Nuxt 3 v 3.7.3 causes the following TS errors:

Looking at the yarn.lock file, it seems the module causes a conflict with the dependency @nuxt/kit, where two versions are installed: 3.7.1 and 3.7.3

Additional context

No response

Logs

No response

urbgimtam commented 1 year ago

Suffering the same issue after installing the module.

dargmuesli commented 1 year ago

Please follow the issue template and link a minimal reproduction using https://stackblitz.com/github/dargmuesli/nuxt-cookie-control?file=playground%2Fapp.vue

If I may guess: make sure you run nuxi upgrade whenever you upgrade Nuxt.

matteomejia commented 1 year ago

Made a reproduction here: link. Make sure to run npm run postinstall and npx nuxi typecheck.

The issue template, AFAIK, may not be able to reproduce the bug, since it always uses the latest Nuxt version to build the module.

dargmuesli commented 1 year ago

Please try v6.4.3 when it's released shortly. I'd keep this issue open a bit longer until I'm sure my Renovate configuration does not pin the dependencies again.

matteomejia commented 1 year ago

I can confirm the issue is gone now that the versions match.

dargmuesli commented 1 year ago

Updated reproduction: https://stackblitz.com/edit/nuxt-starter-gqkq1b?file=package.json I guess that issue requires further monitoring until I'm sure I understand the best way to configure dependency versions for this project.