Cannot read property 'setAutoLogAppEventsEnabled' of undefined on Facebook plugin


#1

Hi, I’m using the Facebook plugin in the app I’m making with Angular, but when I try to run the app I got the next error:

Cannot read property ‘setAutoLogAppEventsEnabled’ of undefined
System.err: File: "file:///data/data/org.nativescript.ChupitosUser/files/app/tns_modules/nativescript-facebook/login-manager.js, line: 14, column: 28

I appreciate any help


#2

Many of facebook plugin problems are related to dirty platform folders, so delete /platforms /hooks /node_modules folders
then run again to get a clean build and see if your problem still persist


#3

@ganas Thank you so much, I did what you said and it worked!! I just had to clean cache after I deleted the folder because I was getting an error, so I deleted the 3 folders and executed

npm cache clean --force