Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix requireNativeComponent missing in react-native-web #3823

Open
5 of 12 tasks
mk0116 opened this issue May 17, 2024 · 2 comments
Open
5 of 12 tasks

Fix requireNativeComponent missing in react-native-web #3823

mk0116 opened this issue May 17, 2024 · 2 comments

Comments

@mk0116
Copy link

mk0116 commented May 17, 2024

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android
  • Web

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.22.2

react-native version: 0.72.13

react-native-web version: 0.19.10

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: Config.SENTRY_DSN,
  tracesSampleRate: 1.0,
});

I have the following issue:

[Description]

An error occurs while compiling on react-native-web.

Compiled with problems
WARNING in ./node_modules/@sentry/react-native/dist/js/tracing/timetodisplaynative.js 22:14-36
export 'requireNativeComponent' (imported as 'requireNativeComponent') was not found in 'react-native' (possible exports: AccessibilityInfo, ActivityIndicator, Alert, Animated, AppRegistry, AppState, Appearance, BackHandler, Button, CheckBox, Clipboard, DeviceEventEmitter, Dimensions, Easing, FlatList, I18nManager, Image, ImageBackground, InteractionManager, Keyboard, KeyboardAvoidingView, LayoutAnimation, Linking, LogBox, Modal, NativeEventEmitter, NativeModules, PanResponder, Picker, PixelRatio, Platform, Pressable, ProgressBar, RefreshControl, SafeAreaView, ScrollView, SectionList, Share, StatusBar, StyleSheet, Switch, Text, TextInput, Touchable, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, UIManager, Vibration, View, VirtualizedList, YellowBox, __esModule, findNodeHandle, processColor, render, unmountComponentAtNode, unstable_createElement, useColorScheme, useLocaleContext, useWindowDimensions)

@krystofwoldrich krystofwoldrich changed the title "Compiled with problems" while compiling for web(react-native-web) Fix warning requireNativeComponent missing in react-native-web May 17, 2024
@krystofwoldrich
Copy link
Member

Hi,
thank you for the message.

We will remove the import for web builds.

@krystofwoldrich krystofwoldrich changed the title Fix warning requireNativeComponent missing in react-native-web Fix requireNativeComponent missing in react-native-web May 27, 2024
@krystofwoldrich
Copy link
Member

Depending on the setup this might lead to a failed build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

3 participants