TBH I always keep my team well rounded so there's rarely a problem I can't deal with. Of the 18 types, there will generally be only 1 or 2 on a given runthrough I don't have something to counter them with (aside from early game and still gathering the team).
I generally don't have an actual dark type on my team, but plenty of the more "animal" style pokemon have a dark attack in bite, and sometimes upgraded to crunch. You'll be interested to know that in later gens they started making a few dark-fighting or dark-psychic combo pokemon, where your counter/opposite is right there on the pokemon that'd normally be bad against ghost. In my Ultra Moon playthrough I have a Malamar, for example, which is psychic-dark (and evolves by literally holding your handheld upside down). Though more typically it's like right now on Sacred Gold, my Feraligatr knows crunch and basically solo'd Morty's gym, only needing to go to the poke center before Morty himself because Crunch was out of PP.