next-themes Error: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function #59892
Replies: 7 comments 7 replies
-
I also had the same problem your only option is to create a ThemeClient component and then use that instead of the theme provider here are screen shots |
Beta Was this translation helpful? Give feedback.
-
I'm facing the same issue, I already wraped the Provider from 🙏🏾🙏🏾🙏🏾 |
Beta Was this translation helpful? Give feedback.
-
add |
Beta Was this translation helpful? Give feedback.
-
any update on this? Having a similar error when using the Sonner component. |
Beta Was this translation helpful? Give feedback.
-
'use client' const Page = () => { hellohello) } export default Page; this component is not working. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I also encountered this problem just now. Here is the solution, and then I will tell you how I discovered this solution. |
Beta Was this translation helpful? Give feedback.
-
use |
Beta Was this translation helpful? Give feedback.
-
Summary
I'm receiving this error after installing next-themes and I'm unable to locate the exact issue.
I've tried deleting the node_modules folder and package-lock.json, then running
npm install
. This did not work.I've tried clearing my next cache by deleting the .next folder and running
npm run dev
again. This also did not work.I've seen online that I should insert
"use client"
at the top of my file, which I have done. But that also has not solved this issue.I've completely narrowed this issue down to next-themes.... now what are my next-steps... see what I did there ;)... stupid.
Anyways, I'm not sure what else to check at this point, but any help is GREATLY appreciated. Thank you!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions