I followed every step of Readme, and I tried both Android & iOS platform, I got the same error.
this._nativeModule.addListener is not a function.(In 'this._nativeModule.addListener(eventType)',
'this._nativeModule.addListener' is undefined)
can anybody help me for this error?
浣犳槸涓嶆槸鍚敊鏈嶅姟浜嗭紵
I am having the same problem. Any idea?
@rosegun38 Maybe you should upgrade your react-native-cli.. try npm install react-native-cli -g
anything new here?
$ sudo lsof -n -i4TCP:8081 | grep LISTEN
$ kill -9 < node id >
This should work..
I am having this same problem using RN v0.27.2 but not with v0.25.1.
Any help would be appreciated
The server opened may not belong to the project.
please see my comment here -> https://github.com/facebook/react-native/issues/8025#issuecomment-236226110
this is how I fixed my project
@n8stowell82 : this link is broken
that is strange, seems like the "link" markdown was breaking the URL. Anyway here is the link to the issue, and my comment is the last one. I also updated the broken link to work properly. Hope this helps
https://github.com/facebook/react-native/issues/8025
@n8stowell82: I am using react-native --version: 0.34.0
still facing the same issue, please find my code below.
const myModuleEvt = new NativeEventEmitter(NativeModules.SubcribeClass);
alert("STEP 1");
var subs = myModuleEvt.addListener('PReceiver', (data) => {
alert("STEP 2")
console.log(data)
});
Shows me an error as this._native.addListener is not a function. please help me with same, Thanks!
Most helpful comment
$ sudo lsof -n -i4TCP:8081 | grep LISTEN
$ kill -9 < node id >
This should work..