phuochau / react-native-thumbnail

Get thumbnail from local media. Currently, it only supports for video.
MIT License
135 stars 104 forks source link

Cannot read property 'get' of undefined #17

Closed har2008preet closed 5 years ago

har2008preet commented 6 years ago

I building on android, with this info: Environment: OS: Windows 10 Node: 8.10.0 Yarn: 1.5.1 npm: 5.8.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed) react: 16.3.0-alpha.1 => 16.3.0-alpha.1 react-native: 0.54.3 => 0.54.3,

n1ru4l commented 6 years ago

Seems like the native-module is not included in the build.

Did you link and follow all the instructions here: https://github.com/phuochau/react-native-thumbnail#android ?

har2008preet commented 6 years ago

yes, i did react-native link and it was successful. But still couldn't used it

jlorencelim commented 6 years ago

Encountered the same error. When I build it in Xcode, it give me this error: 'React/RCTDefines.h' file not found

TriPSs commented 5 years ago

Having the same issue as @jlorencelim, any solution to this?

Sometimes i don't get the error now but RNThumbnail stays undefined

nicoara commented 5 years ago

Did anyone solve this? I am having the same problem with #35 . Thanks!

georgetmayorga commented 5 years ago

@nicoara I solved this by seeing that the NPM package is not up to date with what's on github! So telling npm to use the github repo to install and not the npm package manager solved it.

That looked something like npm install phuochau/react-native-thumbnail (pulling from github not npm package manager)

Then running react-native link worked properly. I am using cocoapods to manage my dependencies so I also manually created a reference to the module in my Podfile to tie it all together

devpascoe commented 5 years ago

Thanks @georgetmayorga this worked and also noticed the podspec moved from the /ios dir to the root package dir as it should. Looks like there needs to be a new version published so the latest bits are downloaded from npm.