Is there a rule regarding the use of there is vs there are at the start of a list containing both singular and plural nouns? For example;
There is an apple, an orange, a carrot and some bananas in the bag.
Sounds incorrect to me even though the 1st noun is singular, however there are does not sound much better...
There are an apple, an orange, a carrot and some bananas in the bag.
There are some bananas, an apple, an orange and a carrot in the bag, sounds OK as the 1st noun is plural.
Is there a better way of writing this? The text is being automatically generated by a computer programme.