Error building metricbeat 7.12.0

Just run simply rm -rf vendor in the root of Beats.

Just to be clear are you building your own Metrcibeat metricset or building Metricbeat on v7.12.0 from the beats repo?