The old Amateur Scientist column in Scientific American had (in June 1974, half a century ago) an installment on how to build a pulsed nitrogen laser. It wasn't that hard. The emission is in the ultraviolet.
I would imagine that IR lasers come with large and scary warnings about the dangers of cooking anyone's eyes; and that night vision lets you see the unexpected paths that an IR laser can take, bouncing off reflective surfaces and such.
Exploring this, I think lightsabers would be Really Hard. Not transporter-level hard, but still tough. I see two paths:
1) Using actual photons in something laser like. The problem here is that your lightsaber would go on forever, photons won't just peter out after a meter or so. So, you would need, well, something to "cap" the lightsaber, both as a cap in terms of ending something, and a cap as in "capture" or possibly even "reflect." So you would need a teensy something floating at the end of your lightsaber, perfectly synchronized with the positions and velocities of the hilt. Also, small enough not to make a viable target for hitting with some other light saber in your duel. It would either be suspended by antigravity or as some kind of tiny drone.
2) Your other alternative is that your lightsaber is really some kind of plasma bottle, a hideously distorted ellipsoidal electromagnetic confinement field. This has its own problems, like your blade not wildly changing shape near metal or if someone throws a refrigerator magnet at your odd Jedi or Sith. You might be able to compensate with some kind of high-speed computations accounting for the magnets and such on the fly and "fixing" the distortions as they occurred. The plasma would be quite different from the plasma you might see in hopeful fusion projects. It would have to be quite hot and dense, eager to dump energy. This might also benefit from the "cap" in the first one.
I could see blasters being a little more likely. Your plasma packet could be self-propagating and you would not have to worry about its stability over multiple seconds and such. Each plasma packet might also benefit from the aforementioned caps, one on each end, zipping toward the target and simply destabilizing when the target is reached, releasing all of the energy at once, rather than the buttery-smooth slices of lightsabers.
3) Circling back, perhaps some esoteric corner of yet-to-be-discovered physics might allow for temporary bosons (the boson nature of photons is what allows for lasers to really do their thing), so perhaps there is some unknown cousin of the photon which could be coaxed into lasting for roughly three and a third nanoseconds (or one meter, take your pick), And hopefully it can come in green, blue, purple, and red.
>Using actual photons in something laser like. The problem here is that your lightsaber would go on forever, photons won't just peter out after a meter or so. So, you would need, well, something to "cap" the lightsaber, both as a cap in terms of ending something, and a cap as in "capture" or possibly even "reflect."
What about using a proton beam, and exploiting the Bragg peak to ionize a finite-length column of air?
Well, protons beat out electrons for at least keeping the divergence down, any volume of lightsaber with a net charge is still going to be vulnerable to fridge magnet attack. Also, I have a strong feeling that it wouldn't look very lightsaber-ish. More like a rapier, although I guess for aesthetic purposes you could have scores of little emissions tubes and switch between them on the order of milliseconds and hope that persistence of vision would create an illusion of thickness.
I have a feeling that the sudden stop could be nasty for even the person holding the hilt, just tons of energy spraying wildly around, a big enough radiation vacation that even the Hulk might blanch at soaking up the gammas. It would still technically qualify as handheld melee arm, but it would be so indiscriminate as to be an inelegant weapon of a more uncivilized age.
Considering how long free electron lasers have to be for the wigglers to work, I'd imagine so. But if you can get electrons to oscillate fast enough in a small enough distance, hit me up.
Or, use flame as the plasma. Confine the plasma with magnets and let the burn time set the length. It could look and act the part, but wouldnt involve actual lasers.
If you search over YouTube, you'll find many people who have built one aspect or another of a lightsaber. There are things that look like lightsabers, but can't collide with each other. There are things that look like lightsabers, but can't collapse into a hilt. There are things that dump energy like lightsabers but don't fit into a dapper little hilt.
It may just be a matter of perspective, but if you spend enough time with the various options, you may well come away with a much better perspective on why you're never going to have anything just like them. You might think seeing the possibilities would make it more likely, but you'll also see just what it would take to be all these things at once.
More efficient lasers are the big barrier to inertial confinement fusion, which IMHO is much cooler given the implications: cheap clean energy forever and awesome fusion torch rockets.
https://www.jstor.org/stable/24950104
https://diverdi.colostate.edu/C431/experiments/time%20domain...
https://www.jonsinger.org/jossresearch/lasers/nitrogen/circu...
https://www.youtube.com/watch?v=pCnXftuJ9Zo