turkyden / react-darkreader

🌓 A React Hook for adding a dark / night mode to your site.
http://react-darkreader.turkyden.com
MIT License
280 stars 20 forks source link

React Dark Reader only Work Locally #15

Open ridi1993 opened 2 years ago

ridi1993 commented 2 years ago

Hi, I have installed The React Dark Reader package, locally it works fine, but when deploying it online, doesn't work properly. Please see below the screenshot: image

Any suggestions on how to solve the issue?

Thanks in advance,

Radon333 commented 2 years ago

What version are you using? I am not even able to install it usingnpm install react-darkreader .

It says:

Found: react@17.0.2 npm ERR! node_modules/react npm ERR! react@"^17.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.6" from react-darkreader@1.5.6 npm ERR! node_modules/react-darkreader npm ERR! react-darkreader@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry

fabicsp commented 2 years ago

I have faced with same issue.

We are using semantic-ui-react / styled-components for styling.

The strange fact is, if you use the chrome extension to switch the dark / light mode, it will work in prod aswell, but after a blink.

I can publish the source code, and a minimal reproduction of the bug:

Source code: Github

Live demo: https://heroku-test-sc-sem-ui.herokuapp.com