Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Error: _reactNativeFetchBlob2.default.readStream is not a function #42

Closed
smartt opened this issue Jul 6, 2016 · 2 comments
Closed

Comments

@smartt
Copy link
Contributor

smartt commented Jul 6, 2016

I'm trying to use readStream, but react native is giving me the red-screen-of-death with the message, "_reactNativeFetchBlob2.default.readStream is not a function".

The package was installed using npm and linked using rnpm. And ideas?

Versions:

  • "react-native": "0.28.0"
  • "react-native-fetch-blob": "^0.6.1"
  • iPhone 6 simulator running iOS 9.3
  • XCode 7.3.1
@smartt smartt changed the title _reactNativeFetchBlob2.default.readStream is not a function Error: _reactNativeFetchBlob2.default.readStream is not a function Jul 6, 2016
@wkh237
Copy link
Owner

wkh237 commented Jul 7, 2016

Hi @smartt , I've just run the tests on iPhone 9.3 and simulator, but it doesn't give me this error. According to your error message, I suppose you're using the package this way

RNFetchBlob.readStream(...)

However readStream is a function in fs namespace, therefore it should be called this way

RNFetchBlob.fs.readStream(...)

Please let me know if this solve your problem, thank you.

@smartt
Copy link
Contributor Author

smartt commented Jul 7, 2016

Got it. I opened a PR #46 to update the example in the README to use fs to hopefully avoid this confusion in the future.

@smartt smartt closed this as completed Jul 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants