[email protected]
[email protected]
Happens only in ios, when trying to import the TextInput component like so:
import { TextInput } from 'react-native-paper';
I am running this using react-native run-ios on an iPhone7 simulator.
I am getting an error:
Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true) with error:(Unable to resolve module `./components/TextInput` from `/Users/yaronlevi/dev/rumble_mobile/node_modules/react-native-paper/src/index.js`: The module `./components/TextInput` could not be found from `/Users/yaronlevi/dev/rumble_mobile/node_modules/react-native-paper/src/index.js`. Indeed, none of these files exist:
* `/Users/yaronlevi/dev/rumble_mobile/node_modules/react-native-paper/src/components/TextInput(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
* `/Users/yaronlevi/dev/rumble_mobile/node_modules/react-native-paper/src/components/TextInput/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)` (null))
__38-[RCTCxxBridge loadSource:onProgress:]_block_invoke.213
RCTCxxBridge.mm:414
___ZL36attemptAsynchronousLoadOfBundleAtURLP5NSURLU13block_pointerFvP18RCTLoadingProgressEU13block_pointerFvP7NSErrorP9RCTSourceE_block_invoke.118
__80-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]_block_invoke
-[RCTMultipartStreamReader emitChunk:headers:callback:done:]
-[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:]
-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]
__88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke
__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
-[NSBlockOperation main]
-[__NSOperationInternal _start:]
__NSOQSchedule_f
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_continuation_pop
_dispatch_async_redirect_invoke
_dispatch_root_queue_drain
_dispatch_worker_thread2
_pthread_wqthread
start_wqthread
Try running the metro bundler first with reset-cache option
react-native start --reset-cache
And start the simulator from another shell: react-native run-ios --simulator="iPhone 7"
Most helpful comment
Try running the metro bundler first with reset-cache option
react-native start --reset-cacheAnd start the simulator from another shell:
react-native run-ios --simulator="iPhone 7"