pliny icon indicating copy to clipboard operation
pliny copied to clipboard

Different next-theme versions

Open rendler-denis opened this issue 8 months ago • 2 comments

Describe the bug When using the Giscus plugin I noticed that the useThemes was returning "undefined" for the Giscus plugin. Debugging I noticed that the plugin uses a different version of the next-theme package.

To Reproduce Steps to reproduce the behavior:

  1. Install the latest version of tailwind-nextjs-starter-blog
  2. activate the Giscus plugin for comments
  3. Switch to dark theme
  4. Loaded Giscus is still using the light theme

Expected behavior The Giscus plugin should use the darkTheme config

Screenshots

Image

System Info (if dev / build issue):

  • OS: any
  • Node version (please ensure you are using 14+): 22.3.0
  • Npm version: 10.8.1

Browser Info (if display / formatting issue):

  • Device [e.g. Desktop, iPhone6]: any
  • Browser [e.g. chrome, safari]: any
  • Version [e.g. 22]: any

Additional context I am not a JS dev, but I suspect the difference in the dependencies is what triggers this.

$ yarn why next-themes                                                                                                       
├─ website@workspace:.
│  └─ next-themes@npm:0.4.6 [13504] (via npm:^0.4.6 [13504])
│
├─ pliny@npm:0.4.1
│  └─ next-themes@npm:0.3.0 (via npm:^0.3.0)
│
└─ pliny@npm:0.4.1 [13504]
   └─ next-themes@npm:0.3.0 [ef868] (via npm:^0.3.0 [ef868])

rendler-denis avatar Apr 12 '25 15:04 rendler-denis

for those coming to this issue, a quick fix would be to add the following to the project's package.json:

"resolutions": {
    "next-themes": "0.4.6"
  }

rendler-denis avatar Apr 12 '25 16:04 rendler-denis

any news on a permanent fix for this?

rendler-denis avatar Aug 03 '25 04:08 rendler-denis