Error: The package 'sovran-react-native' doesn't seem to be linked.

See original GitHub issue

Trying to install and integrate @segment/analytics-react-native into a Expo project (not managed) and not having a lot of luck. Have followed the instructions and I keep getting the following error:

Error: The package 'sovran-react-native' doesn't seem to be linked. Make sure:

- You have run 'pod install'
- You rebuilt the app after installing the package
- You are not using Expo managed workflow
  • analytics-react-native version: ^2.1.6-beta (also tried 2.1.7)
  • Integrations versions (if used):
  • React Native version: 0.64.3
  • iOS or Android or both? ios

Steps to reproduce

  • yarn add @segment/analytics-react-native @react-native-async-storage/async-storage
  • yarn add @segment/sovran-react-native
  • cd ios && pod install
  • expo start -c

Expected behavior

Expect my app to build and for the analytics library to load up without crashing.

Actual behavior

App crashes with the following errors:

Error: The package 'sovran-react-native' doesn't seem to be linked. Make sure:

- You have run 'pod install'
- You rebuilt the app after installing the package
- You are not using Expo managed workflow

at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules/metro-runtime/src/polyfills/require.js:204:6 in guardedLoadModule
at http://192.168.1.64:19000/index.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:305896:3 in global code

Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
alanjcharlescommented, Mar 10, 2022

Hi everyone, thanks for reaching out. It seems people are using a few different builds in this thread so apologies if I don’t cover your use case. If you are using a standard React Native build or anything other than Expo’s managed workflow, you will have to add @segment/sovran-react-native. I have fixed the installation instructions on the readme to account for this. We do not support Expo’s managed workflow as it cuts off access to native modules and is incompatible with multiple features found in this library.

1reaction
StackTraceYocommented, Mar 10, 2022

I am also seeing this with expo managed project, I have even tried installed the sovran-react-native package, but still seeing it

Read more comments on GitHub >

github_iconTop Results From Across the Web

The package 'sovran-react-native' doesn't seem to be linked ...
I'm running Expo managed workflow and running the app in Expo go which I know is not compatible with the package but I...
Read more >
Getting error while doing react-native link - Stack Overflow
3- Write the command react-native link native-base , this command links exactly native-base package with react native.
Read more >
Linking Libraries - React Native
React Native will link your libs based on dependencies and devDependencies in your package. json file. That's it!
Read more >
Analytics for React Native 2.0 | Segment Documentation
The package exposes a method called createClient which you can use to create the Segment Analytics client. This central client manages all the...
Read more >
@segment/analytics-react-native - npm
The hassle-free way to add Segment analytics to your React-Native app.. Latest version: 2.10.0, last published: a month ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found