Different next-theme versions
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:
- Install the latest version of tailwind-nextjs-starter-blog
- activate the Giscus plugin for comments
- Switch to dark theme
- Loaded Giscus is still using the light theme
Expected behavior The Giscus plugin should use the darkTheme config
Screenshots
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])
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"
}
any news on a permanent fix for this?