Edit your own fbsdk MODULE_NOT_FOUND after commend link

I've searched for this error in the git repository and on the internet, but I haven't found anything that brings me here. React native is completely new to me, so if I missed something silly, sorry.

I am trying to install and link action-native-fbsdk in my react-native project: https://github.com/facebook/react-native-fbsdk

I went through the following steps:

react-native init [YourApp]

      

Result: done, project created

react-native install react-native-fbsdk

      

Output: scan 712 folders for symlinks in C: \ wamp \ www \ chatapp \ node_modules (26ms) rnpm-install info react-native-fbsdk module installed and linked successfully

react-native link react-native-fbsdk

      

Output: scan 712 folders for symlinks in C: \ wamp \ www \ chatapp \ node_modules (29ms) {[Error: cannot find module C: \ wamp \ www \ chatapp \ node_modules \ react-native-fbsdk \ package.json '] code:' MODULE_NOT_FOUND '}

Print screen: error output

Of course, when I try to build my app with a responsive run android I got this:

...
:app:processDebugResources                 
:app:generateDebugSources                 
:app:processDebugJavaRes UP-TO-DATE      
:app:compileDebugJavaWithJavac                 
C:\wamp\www\chatapp\android\app\src\main\java\com\chatapp\MainApplication.java:16: error: cannot find symbol
import com.facebook.FacebookSdk;
...

      

Additional Information:

  • Real version: 0.42.3
  • npm -version 4.2.0
  • I didn't find the "react-native-fbsdk" folder under my node_modules.
  • Windows 8.1
  • I am working with Android Studio
  • Android Platform SDK Platform-Tools 25.0.4
  • Android SDK Tools 25.2.3

Thanks in advance. Leo.

EDIT + UPDATE: Added react-native tag. The Facebook team has researched this and it looks like an issue with React Native itself. https://developers.facebook.com/bugs/1889723254644374

+3


source to share


1 answer


After a few days with the community, I found the problem!

This line is not valid if you answer native!

react-native install react-native-fbsdk

      

Instead, we need to write:



npm i -S react-native-fbsdk

      

and then

react-native link react-native-fbsdk

      

+8


source







All Articles