F8app: I got this error when I am going to run the probject

Created on 1 Jun 2016  路  11Comments  路  Source: fbsamples/f8app

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)
img_0443

can anybody help me for this error?

Most helpful comment

$ sudo lsof -n -i4TCP:8081 | grep LISTEN
$ kill -9 < node id >
This should work..

All 11 comments

浣犳槸涓嶆槸鍚敊鏈嶅姟浜嗭紵

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikelambert picture mikelambert  路  7Comments

etamity picture etamity  路  4Comments

brucebnu picture brucebnu  路  4Comments

bjacog picture bjacog  路  7Comments

nobuts-yep picture nobuts-yep  路  6Comments