WrathChaos / react-native-login-screen

🚀 Fully Customizable Beautiful React Native Login Screen
https://www.freakycoder.com
MIT License
212 stars 41 forks source link

TypeError: undefined is not an object (evaluating '_reactNative.Animated.Text.propTypes.style') #17

Closed ZeeshanAhmadKhalil closed 4 years ago

ZeeshanAhmadKhalil commented 4 years ago

I installed Peer Dependencies and then react-native-login-screen. But whenever import LoginScreen using

import LoginScreen from "react-native-login-screen"

then i receive error which says;

Error: Requiring module "node_modules\react-native-login-screen\build\dist\LoginScreen.js", which threw an exception: TypeError: undefined is not an object (evaluating '_reactNative.Animated.Text.propTypes.style')

Please let me know why this error is occurring! Am I doing something wrong or is there any problem with the package?

App.js Code

import React,{Component} from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
} from 'react-native';
import {Button, ThemeProvider,Header} from 'react-native-elements'
import LoginScreen from "react-native-login-screen"

export default class App extends Component{
  render(){
    return(
        <LoginScreen/>
    )
  }
}

Package.json Code:

{
  "name": "RentAla",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@freakycoder/react-native-helpers": "^0.1.3",
    "react": "16.13.1",
    "react-native": "0.63.2",
    "react-native-dynamic-vector-icons": "^1.1.3",
    "react-native-elements": "^2.3.2",
    "react-native-login-screen": "^2.0.3",
    "react-native-material-textfield": "^0.16.1",
    "react-native-spinkit": "^1.5.0",
    "react-native-vector-icons": "^7.1.0"
  },
  "devDependencies": {
    "@babel/core": "7.11.6",
    "@babel/runtime": "7.11.2",
    "@react-native-community/eslint-config": "1.1.0",
    "babel-jest": "25.5.1",
    "eslint": "6.8.0",
    "jest": "25.5.4",
    "metro-react-native-babel-preset": "0.59.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }
}
WrathChaos commented 4 years ago

Hello @ZeeshanAhmadKhalil, Testing the bug right now. I will inform you shortly after.

WrathChaos commented 4 years ago

Oh, I found it. You installed the wrong react-native-material-textfield. The original one is deprecated and it's not working. Please change it with this one:

 "react-native-material-textfield": "https://github.com/WrathChaos/react-native-material-textfield.git",