Interesting thread. One way I could see guns never being invented is if the Chinese industrialized in the early Song Dynasty, developing OTL mid 19th century British-like technology by the second millennium. With this, even though the Song would have gunpowder weapons in the form of land mines, trebuchet thrown bombs and fire arrows, they could easily mass produce effective repeating airguns by casting mass produced Bessemer steel into air reserves. With a breech loading design for these airguns and the easy invention of rifling, which could be much more easily applied to breech loading airguns than to muzzle loading black powder arms for a variety of reasons, the gun would become superfluous. In addition, metal rifle bullets are far lighter than and about as accurate as crossbow bolts as well as being cheaper to produce.
Another alternative to the gun could be the sling has many advantages over the bow, such as being cheaper and easier to produce and the ammunition being lighter, and can be quite powerful. Indeed, in the Americas, the Inka never had a large scale adoption of the bow due to the favorable position of the sling, while
Ancient Hawaii had large naval battles fought between outrigger canoes armed
with slingers. I do not think slings have been given enough credit.