I'm not saying it can't be done. The premise of Shadowrun is sound, the world embraced technology because magic didn't exist. Magic awoke onto the scene so it makes sense that they would be in conflict.
But let's take your typical D&D Fantasy-Land. Magic is all around. Despite the claimed "rarity" of magic items, the heroes will come across a lot of it, usually in the hands of the villain. Magic has been tamed, identified, and spells can be repeated and taught. Magic is the technology. Given how powerful the idea of magic is (getting something for basically nothing), why would anyone pursue mundane technology? Technology would only advance in areas that magic can't. This is why it's important to know the limits of magic in your setting.
So would there be guns in Fantasy-Land? Traditional guns? Not likely, unless they were developed in a place of no magic and brought into Fantasy-Land. Why invent a gun when Flame Bolt and Eldritch Blast wands are options. A "Gun" developed in Fantasy-Land would likely be magic based, a wand shaped like a modern firearm. In which case, does it matter if you reskin wands as pistols?
Here's another instance of unlikely technology in Fantasy-Land, medical kits. Medical kits take time to use and they suck. However, the dearth of healing potions and low level healing spells are far more efficient and effective and would drive out the medical kit market. Heck, the presence of resurrection magic (if you are rich), throws a huge wrench into the circle of life (see Altered Carbon).
I'm not saying you shouldn't use magic and technology in the same setting, I'm suggesting that you think of them as one and the same. Whatever tech you want in a Fantasy setting, consider a magic-themed item that would do that. The gunfighter in a fantasy setting has been done before. Try adding some new spice to the old trope. If you absolutely want them in the same setting for contrast, make sure they each have limits that only the other can fill. Otherwise the inclusion of both may just feel like cheap fan-service.
Also, consider that if technology is there to make ordinary people as powerful as mages, magic will feel far less amazing in your setting.