-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Invariant Violation: View config not found for name RNDateTimePicker (Only happens when installing NPM Package in new project) #91
Comments
Also, if I import the DatePicker with having the SafeAreaView with const App = () => {
return (
<SafeAreaView style={{ display: 'flex', flex: 1 }}>
<DatePicker
title="Date"
onChange={(date) => console.log(date)}
mode="spinner"
/>
</SafeAreaView>
);
}; |
UPDATE |
Thank you @jefelewis, this fixed my issue as well. I also had the same issue. We have a component that we build that includes datetimepicker. The app / parent crashes because of it. But your pod spec fix worked perfectly when added to the parent podfile. |
Hello! I'm closing the issue as it seems to be resolved. Also the issue, as I understand from the previous comment, appears to be in a different RN package. If the issue persists, please open a new one with a runnable repro. Thank you. |
Bug
Issue Summary
I'm building an NPM library using the
@react-native-community/datetimepicker
library, but I am receiving the error when installing my package and trying to use it in a new project.Environment info
React native info output:
Library version:
2.1.0 @react-native-community/datetimepicker
16.9.0 react
0.61.5 react-native
Steps To Reproduce
What Works
npm i @react-native-community/datetimepicker
'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec'
to podfilecd ios
pod install
import RNDateTimePicker from '@react-native-community/datetimepicker';
in DatePicker.tsxreact-native run-ios -- --reset-cache --clearCache
npm run build
npm publish
to publish the package to NPMWhere the issue occurs
npm i react-native-ultimate-modal-picker
.react-native run-ios -- --reset-cache --clearCache
Invariant Violation: View config not found for name RNDateTimePicker
Again, the component renders and works, but the issue only occurs when the NPM library is installed into a project.
Reproducible sample code
The project can be found here (If you want to make a pull request), but below is relevant parts of the code.
App.tsx
DatePicker.tsx
package.json
Podfile
The text was updated successfully, but these errors were encountered: