What's wrong with my /summon command? [1.12] [duplicate]

Numeric item IDs are no longer supported, use the item's string name instead:

/summon item ~ ~2 ~ {Item:{id:"emerald",Count:1}}