donavon / use-dark-mode

A custom React Hook to help you implement a "dark mode" component.
MIT License
1.28k stars 100 forks source link

Could not resolve dependency #69

Closed voxvici closed 3 years ago

voxvici commented 3 years ago
npm ERR! While resolving: test@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from use-dark-mode@2.3.1
npm ERR! node_modules/use-dark-mode
npm ERR!   use-dark-mode@"*" from the root project
denvercoder commented 3 years ago

Why did you close this? Did you find a resolution? I'm having the same issue.

denvercoder commented 3 years ago

Why did you close this? Did you find a resolution? I'm having the same issue.

I just downgraded from React 17.0.1 to React "^16.8.0"

in case anyone else makes it here. ;)

voxvici commented 3 years ago

Force it, works well

djD-REK commented 3 years ago

Yeah the package.json file for use-dark-mode should probably be updated to ^17.0.1, I wouldn't anticipate any conflicts.

On Wed, Mar 24, 2021 at 11:26 AM voxvici @.***> wrote:

Force it, works well

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/donavon/use-dark-mode/issues/69#issuecomment-805969670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMV42QVVUJ6CMREVGUDKJKDTFIHC7ANCNFSM4YORO3ZQ .

hiroyukinuri commented 2 years ago

No reason to close this issue as the PR #68 has not been merged since months, is this project dead?

styfrombrest commented 1 year ago

@hiroyukinuri looks like it is, try this workaround, works for me:

"overrides": {
    "use-dark-mode": {
      "react": "^17.0.0 || ^18.0.0"
    }
  }