The error message is pretty clear, with one of the problems you have, but this is not the only problem with the code that you submitted. Another problem is that you used itemprop without the item for which this property is.
AggregateRating requires an item that is being evaluated. You cannot have AggregateRating without specifying what this refers to. There are two ways to do this (do not do both of them):
Use the containing object and set the AggregateRating property as a property. You (kind of) suggested that this is what you are trying to use itemprop without containing an element. If you want to use this, you need to wrap your itemprop in a suitable item. Suitable products are: Product, Brand, Offer, Event, Organization, Place, Service, CreativeWork. These elements define the aggregateRating property, which may contain AggregateRating.
<div itemscope itemtype="http://schema.org/Product"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews </div> </div>
Use the itemReviewed property for AggregateRating, indicating the Item that the rating points to. Remember to remove itemprop from your question code if you use it.
<div itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews <div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product"> </div> </div>
source share