Closed claudiozam closed 3 years ago
With version 3.0.9, no problem
hello and thanks for reporting, given there is no runnable repro I cannot test this myself but I tend to believe that the culprit is in the fact that you're depending on both "@react-native-community/datetimepicker" and "react-native-modal-datetime-picker" which uses "@react-native-community/datetimepicker". Maybe having two different versions that you depend on causes the issue.
Hope this helps.
Thanks @vonovak
how did u solved it please help
@akashdeepsharma1991 I removed duplicated entries in yarn.lock (package.lock). But this idea is not working with 3.5.2. Problem 1: react-native-modal-datetime-picker, problem 2: native-base
Any update on this ... really frustrating issue.. Is there any specific version combination that need to be use.. I tried one from the example to working..
datetimepicker: 3.5.0 react-native-modal-datetime-picker: ^10.0.0
@claudiozam The above versions did not work on my m1 machine
@manojkumar402 try to add this to your package.json
"resolutions": { "@react-native-community/datetimepicker": "3.5.0" }
@manojkumar402 try to add this to your package.json
"resolutions": { "@react-native-community/datetimepicker": "3.5.0" }
This worked for me with version similar which was required by react-native-modal-datetime-picker
Was fighting with it for 2 days. My version is "@react-native-community/datetimepicker": "3.2.0".
Remove node_modules, delete package-lock.json and is just added ^
in your dependency => "@react-native-community/datetimepicker": "^3.2.0".
Didn't need "resolutions" section in my case. Native base version is ^2.13.14
FYI: i faced this error cos i used yarn to add a package, while npm was already managing all my other packages
so there was a clash
fixed by deleting node_modules, deleting yarn.lock and then doing a fresh npm install
ERROR Error: Requiring module "node_modules/native-base/dist/src/index.js", which threw an exception: Invariant Violation: Tried to register two views with the same name RNDateTimePicker
I had the same problem too and the only temporary solution I could find was to add the smallest version with ^ (in my case "@react-native-community/datetimepicker": "^3.0.2",)
my error - Requiring module "node_modules/react-native-weekly-calendar/node_modules/@react-native-community/datetimepicker/src/picker.ios.js", which threw an exception: Invariant Violation: Tried to register two views with the same name RNDateTimePicker
SOLVED just delete folder (second version) = node_modules/react-native-weekly-calendar/node_modules/@react-native-community/datetimepicker cause we have already one global
Same issue i was also facing .
Installing following version fixed the issue
"@react-native-community/datetimepicker": "^3.5.0",
I am facing the same issue @claudiozam on RN 0.66.4 version. Here is my dependencies
"dependencies": { "@bam.tech/react-native-image-resizer": "^3.0.4", "@native-html/table-plugin": "^2.1.4", "@native-html/transient-render-engine": "^11.2.3", "@react-native-async-storage/async-storage": "^1.17.11", "@react-native-community/cli": "^3.1.0", "@react-native-community/cli-platform-android": "^4.3.0", "@react-native-community/datetimepicker": "^6.7.1", "@react-native-community/netinfo": "^5.9.6", "@react-native-community/push-notification-ios": "^1.10.1", "@react-native-community/toolbar-android": "^0.2.1", "@react-native-firebase/app": "^16.4.6", "@react-native-firebase/messaging": "^16.4.6", "@react-native-picker/picker": "^2.4.4", "@react-native/normalize-color": "^2.0.0", "country-data": "0.0.31", "formik": "^2.1.4", "glob": "^7.1.6", "immer": "^5.3.6", "moment": "^2.24.0", "moment-timezone": "^0.5.41", "native-base": "^2.13.15", "object-to-formdata": "^3.0.9", "pluralize": "^8.0.0", "prop-types": "^15.7.2", "react": "17.0.2", "react-native": "^0.66.4", "react-native-autocomplete-input": "^5.0.0", "react-native-background-timer": "^2.4.1", "react-native-check-box": "^2.1.7", "react-native-collapsible": "^1.5.1", "react-native-copilot": "^2.4.7", "react-native-elements": "^1.2.7", "react-native-fs": "^2.16.6", "react-native-i18n": "^2.0.15", "react-native-image-crop-picker": "^0.32.2", "react-native-image-picker": "^2.3.1", "react-native-inappbrowser-reborn": "^3.4.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-localize": "^2.2.5", "react-native-markdown-display": "^6.1.6", "react-native-modal": "^11.5.6", "react-native-popup-menu": "^0.15.7", "react-native-push-notification": "^8.1.1", "react-native-render-html": "^4.2.3", "react-native-safe-area-context": "^4.3.3", "react-native-scroll-into-view": "^2.0.1", "react-native-simple-radio-button": "^2.7.4", "react-native-splash-screen": "^3.2.0", "react-native-status-bar-height": "^2.5.0", "react-native-svg": "^12.1.0", "react-native-table-component": "^1.2.1", "react-native-vector-icons": "^6.7.0", "react-native-webview": "11.23.1", "react-redux": "^7.1.3", "react-router-native": "^5.1.2", "redux": "^4.0.5", "redux-saga": "^1.1.3", "rn-fetch-blob": "^0.12.0", "styled-components": "^5.3.5", "victory-native": "^36.6.8", "yup": "^0.28.1" },
not able to resolve, can someone suggest solution?
Hi @ankit-navyug. This is the problem -> "native-base": "^2.13.15".
Try to use resolutions. For example:
"resolutions": { "@react-native-community/datetimepicker": "3.5.2" }
May the force be with you....
Bug report
Summary
Unable to start the app in ios after update the datetimepicker to ver. @react-native-community/datetimepicker@3.4.0.
Reproducible sample code
Steps to reproduce
Environment info
npx react-native info
output:datetimepicker version: 3.4.0
iOS 14.4