root-two / react-native-drawer

React Native Drawer
MIT License
2.53k stars 390 forks source link

Vanilla install of demo does not work. #181

Open sbefort opened 8 years ago

sbefort commented 8 years ago

Steps to reproduce problem:

git clone https://github.com/rt2zz/react-native-drawer.git
cd react-native-drawer/examples/RNDrawerDemo && npm install

Open RNDrawerDemo.xcodeproj in Xcode and run it on an iPhone 6 simulator. Get these errors in Xcode:

2016-06-25 15:58:39.500 [warn][tid:com.facebook.React.JavaScript] this._nativeModule.addListener is not a function. (In 'this._nativeModule.addListener(eventType)', 'this._nativeModule.addListener' is undefined)
2016-06-25 15:58:39.514 [warn][tid:com.facebook.React.JavaScript] Requiring module "184", which threw an exception.
2016-06-25 15:58:39.517 [info][tid:com.facebook.React.JavaScript] Unable to load source map: Couldn't fetch script text
2016-06-25 15:58:39.517 [info][tid:com.facebook.React.JavaScript] Unable to load source map: Couldn't fetch script text
2016-06-25 15:58:39.519 [error][tid:com.facebook.React.RCTSourceCodeQueue][RCTModuleMethod.m:416] RCTSourceCode.getScriptText was called with 0 arguments, but expects 2
2016-06-25 15:58:39.520 [error][tid:com.facebook.React.RCTWebSocketModuleQueue][RCTModuleMethod.m:416] RCTWebSocketModule.connect was called with 4 arguments, but expects 2
(lldb) 
quadsurf commented 8 years ago

Didn't work for me either... I get:

Cannot read property 'func' of undefined PropTypes

and also...

Cannot read property 'object' of undefined PropTypes

and yet I'm clearly running: import { PropTypes } from 'react-native'; on all involved files.

I'm running RN0.33

I thought it might be because of the author's uncommon usage of importing Component from 'react-native' instead of importing Component from 'react', but that didn't resolve it... here's what I mean:

common setup: import React, { Component } from 'react'; import { PropTypes } from 'react-native';

author's uncommon setup: import React, { Component, PropTypes } from 'react-native';

is the author's setup even allowed? can't tell if this different kind of setup even works since the other undefined errors are triggered first.

vigyanhoon commented 8 years ago

Same error here too.

screen shot 2016-09-28 at 8 02 28 am