Locals have won a David v Goliath battle to stop Britain’s biggest solar farm being built next to a famous beauty spot.