question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unwanted peer dependency message

See original GitHub issue

When installing react-hot-toast (or running npm install in a project that already has react-hot-toast) the following warning is shown:

npm WARN goober@2.0.28 requires a peer of csstype@^2.6.2 but none is installed. You must install peer dependencies yourself.

Documentation says nothing about need of csstype.

Maybe react-hot-toast should make it regular dependency if it’s needed?

On the other note, there are users, who are using just headless mode, and they don’t need neither goober or csstype.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thien-docommented, Feb 2, 2022

oh if that’s the case it seems Yarn (or whatever package manager you are using) is more strict these days. Look like we will need to fix it properly (so either from RHT or from Goober)

1reaction
thien-docommented, May 19, 2021

Sorry @timolins but I don’t think https://github.com/timolins/react-hot-toast/commit/d60adb6501af27dd0d3bf9fde75498dd3ce253a5 fixes the issue in RHT’s users. Since it’s “dev” dependency, it’s not installed when the user installs RHT as their dependencies, so the warn would still be there

Maybe it’s better to:

  • Put csstype as devdependency in the user’s package.json
  • Put csstype as dependency of RHT
  • Ask goober to put csstype as their dependency instead of peer
Read more comments on GitHub >

github_iconTop Results From Across the Web

Addressing the shortcomings of peer dependencies - HackMD
Peer dependencies are intended to help reduce duplicate installs in applications by allowing libraries to opt out of introducing them, yet fall short...
Read more >
Warning from unnecessary peer dependency on `prop-types`
Current behavior Running yarn gives the following warning: warning " > react-intl@2.9.0" has unmet peer dependency "prop-types@^15.5.4". Step to rep...
Read more >
How do I fix the npm UNMET PEER DEPENDENCY warning?
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.
Read more >
Error npm UNMET PEER DEPENDENCY warning - Edureka
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.json file is not met. Check...
Read more >
How to fix npm dependency hell - Sylhare's blog
This will do a clean installation of the modules, removing the previous node modules and won't try to update the dependencies (which can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found