ide / react-native-button

A button for React apps
MIT License
774 stars 129 forks source link

Not working in react-native-web #91

Open learncodingforweb opened 3 years ago

learncodingforweb commented 3 years ago

WARNING in ./node_modules/react-native-button/Button.js 154:18-37 export 'ViewPropTypes' (imported as 'ViewPropTypes') was not found in 'react-native-web/dist/index' (possible exports: AccessibilityInfo, ActivityIndicator, Alert, Animated, AppRegistry, AppState, Appearance, BackHandler, Button, CheckBox, Clipboard, DeviceEventEmitter, DeviceInfo, Dimensions, DrawerLayoutAndroid, Easing, FlatList, I18nManager, Image, ImageBackground, InputAccessoryView, InteractionManager, Keyboard, KeyboardAvoidingView, LayoutAnimation, Linking, LogBox, Modal, NativeEventEmitter, NativeModules, PanResponder, PermissionsAndroid, Picker, PixelRatio, Platform, Pressable, ProgressBar, RefreshControl, SafeAreaView, ScrollView, SectionList, Settings, Share, StatusBar, StyleSheet, Switch, Systrace, TVEventHandler, Text, TextInput, ToastAndroid, Touchable, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, UIManager, Vibration, View, VirtualizedList, YellowBox, findNodeHandle, processColor, render, unmountComponentAtNode, unstable_createElement, useColorScheme, useWindowDimensions)

browser shows error

Uncaught TypeError: Cannot read property 'allowFontScaling' of undefined
    at eval (Button.js:168)
    at Module../node_modules/react-native-button/Button.js (bundle.js:41)
    at __webpack_require__ (bundle.js:3038)
    at eval (Home.js:9)
    at Module../src/Home.js (bundle.js:74)
    at __webpack_require__ (bundle.js:3038)
    at eval (App.js:9)
    at Module../src/App.js (bundle.js:63)
    at __webpack_require__ (bundle.js:3038)
    at eval (index.js:4)

using following packages

"dependencies": {
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-native-button": "^3.0.1",
    "react-native-web": "^0.15.6"
  },
waqaramjad commented 3 years ago

same issue here

RoyBkker commented 3 years ago

Same issue here