Yes, I also have this problem. I 'solved' it in terms of dating by analyzing all of my past relationships, good and bad, and then making a list of red flags and desired attributes. I simply did not date people who had a red flag, no matter how much I was attracted to them. It took a year before I met someone who didn't have any of the red flags -- and we've been together over six years now
Now I think I need to make the same kind of list for evaluating potential friendships. I've realized this year that I have a tendency to attract/be attracted to narcissists as friends as well.