In the sentence
Vivant de ses troupeaux, que des bergers menaient paître sur les montagnes.
what does "de" mean? Near (I know that it translates as "près de")? Or literally "from"? The sentence is complete.
Neither. In English we say "live off X". That is, the shepherd subsists on his flocks and earns his money from them (selling wool or whatever).
You verify this by checking in a dictionary like WordReference that includes compound forms like vivre de. Often that will be its own article.
Unfortunately, sometimes WordReference lacks an article for the compound, but if you scroll down the article for vivre you can see that there's still a separate entry for vivre de :
This process is described in more detail here.
(A related English expression is "live on X", which is often a synonym. But in the context of animals it wouldn't be the same... it would imply he lives by eating them!)