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

Peer dep warning for prop-types #16

Open
crutchcorn opened this issue Mar 1, 2021 · 1 comment
Open

Peer dep warning for prop-types #16

crutchcorn opened this issue Mar 1, 2021 · 1 comment

Comments

@crutchcorn
Copy link

I am using a React Native project with TypeScript. Because I am using TypeScript, I do not want to be using prop-types. However, npm 7 added back auto-installing peer deps, and will throw errors if a peer dependency is not met/invalid.

I would like to suggest migrating prop-types to an optional dependency, or omitting it entirely to sidestep this issue. I'd be willing to make a PR with whatever decision is made

@crutchcorn
Copy link
Author

It turns out there's also a way to set peerDeps as optional:

https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependenciesmeta

I'll make a PR to do just that, as that seems to fix the error

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

Successfully merging a pull request may close this issue.

1 participant