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

Component uses prop-types dependency but does not declare it as a dependency #243

Open
wojtekmaj opened this issue Apr 11, 2023 · 2 comments

Comments

@wojtekmaj
Copy link

Component uses prop-types dependency but does not declare it as a dependency resulting in app crashing if the user did not already install prop-types.

@ryanseddon
Copy link
Owner

It's listed as a peer-dependecy but I do know codesandbox complains it's missing, not sure if peer deps ever got ratified as an actual thing across different package managers

@wojtekmaj
Copy link
Author

Yarn and PNPM do not install peerDependencies and npm's decision to install them is generally frowned upon. The safest bet is always to declare dependencies you use as, well, dependencies. A notable exceptions could be react and react-dom since you usually don't want to have multiple copies of that.

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

No branches or pull requests

2 participants