React-native-deck-swiper: Module `react-native-view-overflow` does not exist in the Haste module map

Created on 8 Apr 2019  路  18Comments  路  Source: alexbrillant/react-native-deck-swiper

after install the package my app crashes with this message:

Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Unable to resolve modulereact-native-view-overflowfrom.../node_modules/react-native-deck-swiper/Swiper.js: Modulereact-native-view-overflow` does not exist in the Haste module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache.
  4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*. (null))

__38-[RCTCxxBridge loadSource:onProgress:]_block_invoke.228
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
`

I'm on

{
    "react": "16.8.3",
    "react-native": "0.59.1",
}

Most helpful comment

I fixed this issue by
npm install --save react-native-view-overflow

So funny 馃槃 Now demo works on IOS simulator

All 18 comments

I had a similar issue and fixed it by setting the useViewOverflow prop to false

I also fixed this with useViewOverflow prop -- but in my case (using expo, so no way to have view overflow on android specifically), I only had an issue on android with this. My solution:

import { Platform } from 'react-native'

...

<Swiper
  ...props
  useViewOverflow={Platform.OS === 'ios'}
/>

~I get this error even before putting the component anywhere. Just plain import Swiper from 'react-native-deck-swiper'; is enough for this error to reproduce.~ forget about this, adding the missing package fixed stuff

Hey @JacobJaffe,

you managed to have it working on expo and android? I am having issue of cards not swiping on android while on ios its working just fine. Can you share your working example?

I fixed this issue by
npm install --save react-native-view-overflow

So funny 馃槃 Now demo works on IOS simulator

I fixed this issue by
npm install --save react-native-view-overflow

So funny Now demo works on IOS simulator

solved by this, thank u!

I fixed this issue by
npm install --save react-native-view-overflow
So funny Now demo works on IOS simulator

solved by this, thank u!
solved my problem too, thank u!

@alexbrillant Any ideas why this doesn't work?

Ohh got it after seeing the source code, "react-native-view-overflow": "0.0.4", is only added as a peerDependency while it is also a dependency & should be added as a dependency.

I've opened a PR #252 that closes this issue :)

I also have same problem.

Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module react-native-view-overflow from /home/tayfun/dev/gitlab/instaton-mobile/node_modules/react-native-deck-swiper/Swiper.js: Module react-native-view-overflow does not exist in the Haste module map

npm install --save react-native-view-overflow
solved by this, thank u

I am using yarn. Not fixed with installing the react-native-view-overflow. Any ideas ?

I am using yarn. Not fixed with installing the react-native-view-overflow. Any ideas ?

installing react-native-view-overflow with yarn will not work, try this solution

If you are not using Expo and you want to temporarily fix the problem, then:
npm install react-native-view-overflow --save
react-native link react-native-view-overflow (do not forget this one)

However if you are using Expo, this won't work as the react-native-view-overflow module requires native code (hence react-native link ...). And this is not supported in Expo.

I might be wrong, but react-native-deck-swiper depends on an old version of react-native: "^0.49.1" where the overflow functionality wasn't native. That's why it requires the react-native-view-overflow module to provide it.

The right solution would be a patch to this project to stop using react-native-view-overflow and switch to the native React Native solution.

If my PR is accepted, this issue will be fixed.

I fixed this issue by
npm install --save react-native-view-overflow

So funny 馃槃 Now demo works on IOS simulator

Solved by this, thank you!

I fixed this issue by
npm install --save react-native-view-overflow

So funny 馃槃 Now demo works on IOS simulator

Shouldn't this be listed as a dependency somewhere??

So this package is not usable with expo?

Was this page helpful?
0 / 5 - 0 ratings