Generator car – why was there never one?

Hello, why don’t you think there was never a car with a generator? No, I don’t mean the range extender. There are diesel forklifts that have a burner but are electrically powered. There are diesel locomotives. a generator generates electricity and the locomotive drives electric. Today there are ships that are genaators and are electrically powered. Why not a generrator car with a motor bike engine? What is against it?