Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cant install next-theme on new verison next 14.0.0 #228

Closed
Raoufbaa opened this issue Oct 29, 2023 · 6 comments
Closed

i cant install next-theme on new verison next 14.0.0 #228

Raoufbaa opened this issue Oct 29, 2023 · 6 comments

Comments

@Raoufbaa
Copy link

i cant install next-theme on new verison next 14.0.0 im getting
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! While resolving: next-auth@4.24.3
npm ERR! Found: next@14.0.0
npm ERR! node_modules/next
npm ERR! next@"^14.0.0" from the root project
npm ERR! peer next@"" from next-themes@0.2.1
npm ERR! node_modules/next-themes
npm ERR! next-themes@"
" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12.2.5 || ^13" from next-auth@4.24.3
npm ERR! node_modules/next-auth
npm ERR! next-auth@"^4.23.2" from the root project
npm ERR! Conflicting peer dependency: next@13.5.6
npm ERR! node_modules/next
npm ERR! peer next@"^12.2.5 || ^13" from next-auth@4.24.3
npm ERR! node_modules/next-auth
npm ERR! next-auth@"^4.23.2" from the root project
and when i modified next version to 13.5.6 on package.json it install just fine and when i revert back the default value to package.json
and try importing the themeProvider from "next-themes" in layout.js i got erros Createcontext must be in client mode

@barrymichaeldoyle
Copy link

Weird, I created a new NextJS project the other day using Next 14 and it installed fine 😕

@sandrinjoy
Copy link

@Raoufbaa
check and see if this helps.
#194 (comment)

@JamesBream
Copy link

@Raoufbaa That install issue seems to be an issue with next-auth requiring Nextjs 13 or lower, not this package. Try updating your next-auth package to the newest version.

@Raoufbaa
Copy link
Author

Raoufbaa commented Nov 7, 2023

the next-auth is running on latest verison and i had same problem

@fad16papa
Copy link

is this already resolved? Im also encountering this error now. Thanks

@trm217
Copy link
Collaborator

trm217 commented Apr 22, 2024

See the example on how to use next-themes in the app-dir. Confirmed to be working as of next.js v14.2.0

@trm217 trm217 closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants