You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-native-modal-datetime-picker fails to declare peerDependency on React (likely: >=17.0.0), which it imports in typings. Consequently, type checking react-native-modal-datetime-picker fails on Yarn in PnP mode (which is a bit more strict, not allowing packages access to other packages "by accident"):
Error: input_field/date_input.tsx(66,7): error TS2607: JSX element class does not support attributes because it does not have a 'props' property.
Error: input_field/date_input.tsx(66,[8]error TS2786: 'DateTimePicker' cannot be used as a JSX component.
Its type 'typeof DateTimePicker' is not a valid JSX element type.
Type 'typeof DateTimePicker' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any, any, any>'.
Type 'DateTimePicker' is missing the following properties from type 'Component<any, any, any>': context, setState, forceUpdate, render, and 3 more.
react-native-modal-datetime-picker fails to declare peerDependency on React (likely:
>=17.0.0
), which it imports in typings. Consequently, type checking react-native-modal-datetime-picker fails on Yarn in PnP mode (which is a bit more strict, not allowing packages access to other packages "by accident"):Adding the following to
yarnrc.yml
:fixes the issue, which proves adding a
peerDependency
onreact
is all it takes to fix it.The text was updated successfully, but these errors were encountered: