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

Unwanted peer dependency message #44

Closed
hudochenkov opened this issue Feb 15, 2021 · 7 comments · May be fixed by #262 or vAHiD55555/proxy-provider-converter#4
Closed

Unwanted peer dependency message #44

hudochenkov opened this issue Feb 15, 2021 · 7 comments · May be fixed by #262 or vAHiD55555/proxy-provider-converter#4
Assignees

Comments

@hudochenkov
Copy link
Contributor

hudochenkov commented Feb 15, 2021

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.

@timolins
Copy link
Owner

timolins commented Mar 3, 2021

Thanks for reporting. I guess we can add csstype as dependency, just like you mention. Since it's types only it shouldn't matter, other than giving you a better dev experience when styling.

@timolins timolins self-assigned this Mar 3, 2021
@thien-do
Copy link

Sorry @timolins but I don't think d60adb6 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

@liamlows
Copy link

liamlows commented Feb 1, 2022

@thien-do @timolins sorry to pull this issue out of the dark but we are trying to clean up our repo/packages and see the same resolution error with yarn:
react-hot-toast@npm:2.2.0 doesn't provide csstype, requested by goober
Is the suggestion that csstype must be installed as a dependency on our end, or is adding it as a devDependency good enough?
Also it may be worthwhile to add this to the ReadME if so.
Thanks!

@thien-do
Copy link

thien-do commented Feb 1, 2022

Is the suggestion that csstype must be installed as a dependency on our end, or is adding it as a devDependency good enough?

Hard to say without knowing the codebase, but I think the best bet is you should not be asked to have a dependency if you don't use it directly. This means the best option should be:

Ask goober to put csstype as their dependency instead of peer

While the best workaround should be:

Put csstype as devdependency in the user's package.json

@liamlows
Copy link

liamlows commented Feb 1, 2022

@thien-do ok i went ahead and added it as a dev dependency however I am still getting the same issue. The same resolution warning pops up. Any idea what to do here?

@thien-do
Copy link

thien-do commented 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)

@mikecousins
Copy link

I'm running into this as well with latest yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants