For most people a battery powered lighting solution is the simplest, most effective, and reliable. A 12V 20W LED H4 light puts out real headlight levels of light and only draws 1.6 Amps. Toss in a high output LED tail light and you are still around 2 amps total.
I can build a battery pack with 8 high discharge IMR 26660 batteries to power said lights for up to 4 hours. These are cells designed to output 40 amps continuous at 3.7V, which are completely overkill for this scenario and have a relatively low capacity. 4 in series run in 2 banks of parallel gives 80 amps continuous discharge capacity (120 peak). I actually used these cells to build an emergency start battery for my dual sport, and yes, it worked lol.
I have other cells of the same type that can only do 10A continuous, but have 3 times the capacity. That gives 10 hours of potential charge and 20 Amps of continuous discharge capability, which is 10 times what is needed to power my example/theoretical headlight/tail light combo.
A battery pack that is 2 inches tall 3 inches wide, and less than 5 inches long - making it smaller than, or the same size as, most small powersports batteries for things like a dirt bike, can run a headlight and tail light for up to 10 hours.
Heck, just 4 in series could do it and last up to 5 hours. 4 of these batteries takes up about the same space as a weirdly shaped smart phone.
I get the theoretical appeal of having a generator on the vehicle, but with the way battery and lighting technology has been going, it offers a more than adequate alternative for most scenarios you can find yourself in.