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

undefined is not an object(evaluating '_react2.default.PropTypes.object') #1707

Closed
byk04712 opened this issue Aug 21, 2017 · 1 comment
Closed

Comments

@byk04712
Copy link

Version

1.6.3

Environment

os:macos react-native-cli: 2.0.1 react-native: 0.47.1 npm: 5.3.0 node: v8.3.0

Reproduction link

https://mobile.ant.design

Steps to reproduce

npm install antd-mobile --save 之后,启动项目报错,undefined is not an object(evaluating '_react2.default.PropTypes.object') 查找后发现是 antd-mobile 中使用了 react-native-camera-roll-picker ,而react-native-camera-roll-picker里的 ImageItem.js 中使用了 React.PropTypes.object,在新版中 React中,PropTypes 不包含在 React 中,需要单独安装 npm install prop-types --save 。而antd-mobile 中,不仅仅只有 react-native-camera-roll-picker 使用到了它 ,其他几个依赖的项也有使用到。希望官方尽快修复这个 issues。

What is expected?

npm install antd-mobile 之后能直接使用,不用去修改里面的 React.PropTypes 为 import PropTypes fron 'prop-types'; PropTypes

What is actually happening?

抛异常 undefined is not an object(evaluating '_react2.default.PropTypes.object')

@silentcloud
Copy link
Contributor

silentcloud referenced this issue in jeanpan/react-native-camera-roll-picker Aug 21, 2017
Migrating from React.PropTypes
lixiaoyang1992 pushed a commit to lixiaoyang1992/ant-design-mobile that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants