segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
354 stars 182 forks source link

Error types import breaks @segment/analytics-react-native-plugin-firebase #821

Closed matthieuMay closed 1 year ago

matthieuMay commented 1 year ago

Versions: "@segment/analytics-react-native": "2.13.5", "@segment/analytics-react-native-plugin-firebase": "^0.3.8",

Error: error: Error: Unable to resolve module ../../../core/src/errors from /Users/matthieubouxin/devs/may/mobile/node_modules/@segment/analytics-react-native-plugin-firebase/src/FirebasePlugin.tsx:

Solved by the following patch package:

diff --git a/node_modules/@segment/analytics-react-native-plugin-firebase/src/FirebasePlugin.tsx b/node_modules/@segment/analytics-react-native-plugin-firebase/src/FirebasePlugin.tsx
index 522312b..11c0316 100644
--- a/node_modules/@segment/analytics-react-native-plugin-firebase/src/FirebasePlugin.tsx
+++ b/node_modules/@segment/analytics-react-native-plugin-firebase/src/FirebasePlugin.tsx
@@ -10,7 +10,7 @@ import screen from './methods/screen';
 import track from './methods/track';
 import reset from './methods/reset';
 import firebaseAnalytics from '@react-native-firebase/analytics';
-import { ErrorType } from '../../../core/src/errors';
+import { ErrorType } from '@segment/analytics-react-native';

 export class FirebasePlugin extends DestinationPlugin {
   type = PluginType.destination;

This issue body was partially generated by patch-package.

alanjcharles commented 1 year ago

Hi @matthieuMay should be fixed in 0.3.9