React-native: after i update the react-native. I got this error, "undefined is not an object (evaluating 'React.PropTypes.bool')".

Created on 25 May 2016  路  9Comments  路  Source: facebook/react-native

after i update the react-native. I got this error, "undefined is not an object (evaluating 'React.PropTypes.bool')".

OS: MAC
react native: 0.26.1
iOS

Locked

Most helpful comment

please read the changelog before you upgrade your RN, React has been seperated from React-Native since RN0.25
change

import React, {
  PropTypes,
  ...
} from 'react-native';

to

import React, {
  PropTypes
} from 'react';
import {
  ...
} from 'react-native';

All 9 comments

please read the changelog before you upgrade your RN, React has been seperated from React-Native since RN0.25
change

import React, {
  PropTypes,
  ...
} from 'react-native';

to

import React, {
  PropTypes
} from 'react';
import {
  ...
} from 'react-native';

@nihgwu is right. Thanks for answering.

I have done changes, but still gives me the error.

Initially it was as below
//import React, {Component, Navigator, StyleSheet, Text, View, Platform, PropTypes} from 'react-native';

I change that to
import React,{Component,PropTypes} from 'react';
import {Navigator, StyleSheet, Text, View, Platform} from 'react-native';

but it gives the error that undefined is not a object (evaluating 'React.PropTypes.bool')

@devekoperiOS perhaps the third-party components haven't upgrade to RN0.26

i am also getting the same issue... @nihgwu your solution did'nt helped... any idea ?

@VishalBumpy perhaps you just forget to install 'react'? it's not installed automatically when you init a new project

@nihgwu I did, still i am getting the same error

@nihgwu i solved the issue... seems my npm ran into some error. :)

Sorry guys, I am struggling with react-native as a beginner and when you suggest to "update the file" i have no idea which file are you referring to... Could you please point me to the file that needs to be changed? @nihgwu @devekoperiOS

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oney picture oney  路  3Comments

TrakBit picture TrakBit  路  3Comments

josev55 picture josev55  路  3Comments

jlongster picture jlongster  路  3Comments

anchetaWern picture anchetaWern  路  3Comments