Electric cars were invented in 1881 a full 4 years before the first internal combustion car.
Back when cars were new, there was no infrastructure for petrol either, that was something you got in tiny quantities from a pharmacy. (The diesel engine can run on vegetable oil, but I don't think Mr Rudolf Diesel himself ever did that?)
https://en.wikipedia.org/wiki/Rudolf_Diesel#Use_of_vegetable...