I'm probably the only person that will throw this build at you, but here ya go:

Human or Wood-Elf Barbarian

at third level take the Totem Warrior path, select the Eagle totem powers at each totemic power selection.

As a Barbarian archer, you will have your Dex and Con pumped, with Unarmored defense that means you can have a relatively high AC without wearing armor no disadvantage on stealth rolls, perfect for you to sneak into the trees or around the enemy to set up an ambush. You get the biggest hit die of any class so you can still stand up to a little punishment and with rage, despite a somewhat neglected Str stat (don't dump it), you can still do decent melee damage in tight combat. If you need an AC bump you can use a shield without losing your unarmored defense.

-Argument for human: Feat, Crossbow expert or sharpshooter, the reality is, you don't need either of them, particularly not at first level.

-Argument for Wood Elf: Dex and Wis bump (good perception good for archer), Trained with a bow, even though as Barbarian you can use them anyway, Fleet of foot, extra 5 feet of movement in a class that gains another 10 feet, that gives you a big advantage for moving away from hostiles or into better position, Mask of the Wild, you can hide anywhere with only being lightly obscured, again perfect for an archer.

By taking the eagle powers, the first one allows you to impose disadvantage on attacks of opportunity from movement, so you can escape melee combat with a lower likelihood of being hit, second improvement your eyesight becomes insanely powerful including no disadvantage at dusk and seeing fine detail out to 1 mile, at 14th level you can fly 45 - 90 feet on your turn, to give yourself high ground so you can only be targeted by other ranged attacks.

Added bonus: Enter a rage to take half damage, but by being a barbarian you can melee with the best of them, without compromising being an amazing archer of stealthy awesomeness. Also, bonus points, unique build.

Edit: Longbow, all day, you don't need to take a feet to be super useful, crossbow's eat your move action to reload, and further range, I believe. Really just a better weapon.