betaacid / expo-analytics

Google Analytics integration for use with React Native apps built on Expo
MIT License
288 stars 63 forks source link

`@unimodules/core` does not exist in the Haste module #37

Closed kluz9 closed 4 years ago

kluz9 commented 5 years ago

Hello, I recently installed expo-analytics and expo-constants. I am using expo v 31.0.0 My package.json looks like this: "dependencies": { "expo": "^31.0.0", "expo-analytics": "^1.0.9", "expo-constants": "^5.0.1", "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz", .... }

But when I open my app, I get following unimodule error:

Unable to resolve module @unimodules/core from .../node_modules/expo-analytics/node_modules/expo-constants/build/ExponentConstants.js: Module@unimodules/core` 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/metro-bundler-cache-*.

ABI31_0_0RCTFatal __37-[ABI31_0_0RCTCxxBridge handleError:]_block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE __CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main start 0x0

Any suggestions ?

dawidczech355a commented 5 years ago

I had similar problem, it helped for me (i use expo v32):

maybe it's not the best practice, but i had to upgrade app version, so if you have similar situation try my solution

ryanvanderpol commented 5 years ago

Thanks for reporting this. Right off the bat I'd say it's related to the change that was made in v1.0.9 to support Expo SDK33 (see PR #34). Sounds like that change is not compatible with previous versions of Expo.

peterkuiper commented 5 years ago

I am having the same problem. This should have been a major release, but it is easy to miss with all these Expo SDK changes lately. Maybe you can still do a major release and deprecate the 1.0.9 release. Either way, thanks for your work on this module!