react-timezone-select icon indicating copy to clipboard operation
react-timezone-select copied to clipboard

The package `react-select` is listed as a peer dependency, but should be optional

Open benjitrosch opened this issue 7 months ago • 3 comments

To quote the README:

The package react-select is optional. It is unnecessary if you're only using the hook.

However, you can see react-select listed here as a peer dependency: https://github.com/ndom91/react-timezone-select/blob/4396e24e461489ba6797a646354a71f2bd77ece7/package.json#L50

This means that, whether or not we need react-select, it will still get installed despite not explicitly installing it ourselves. For my specific use-case, I'm only using the hook, and react-select is causing build errors for us.

benjitrosch avatar Jun 05 '25 21:06 benjitrosch

Same for me. I tried it just with the hook and ended up in some errors as React Select was missing.

markusguenther avatar Jul 16 '25 17:07 markusguenther

I'm working with pnpm which doesn't auto-install peer dependencies. What package manager are you using?

ndom91 avatar Jul 18 '25 16:07 ndom91

@ndom91 our team is using npm.

benjitrosch avatar Jul 28 '25 15:07 benjitrosch