juandl / react-native-credit-card-input-plus

Easy, cross-platform credit-card input for your React Native Project! Start accepting payment 💰 in your app today!
MIT License
29 stars 26 forks source link

Not working on expo ~47.0.12 #11

Closed ejkkan closed 1 year ago

ejkkan commented 1 year ago

after yarn installation this throws on building the app: Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

juandl commented 1 year ago

Thank you for reporting this, will pushing an update this weekend 👍🏻

ejkkan commented 1 year ago

@juandl thanks for the effort on keeping this lib up. There are not really any working card input libraries tht are working well on both android and ios now, so getting this up and running would be amazing 🤩

juandl commented 1 year ago

I'm happy to announce the new version! :rocket: #0.4.6, please check it out!

ejkkan commented 1 year ago

Thanks for looking at this so quickly @juandl

However the problem seems to persist, at least for me.

fresh install of the package:

"react-native-credit-card-input-plus": "^0.4.6",
// rn versions
"expo": "~47.0.12",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.5",

When trying to import any of the components that are using the deprecated props package it throws:

 ERROR  Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
juandl commented 1 year ago

@ejkkan can you check this file please "node_modules/react-native-flip-card/lib/FlipCard.js" and send a capture?

ejkkan commented 1 year ago

Certainly, here:

'use strict'

import React, { Component } from "react";
import PropTypes from "prop-types";

import {
  View,
  TouchableOpacity,
  Animated,
  Platform,
  ViewPropTypes
} from "react-native";

import S from './Style.js'

export default class FlipCard extends Component {
  static propTypes = {
    style: ViewPropTypes.style
  }

.....

Looks like it still uses the old prop-types?

juandl commented 1 year ago

@ejkkan give it a try #0.4.7

ejkkan commented 1 year ago

Works like a charm! Big thanks! 🙏