The hadeeth which says that there was no Prophet sent by Allah but he had hawaariyyoon (disciples) is to be understood as referring to what was mostly the case
Praise be to Allah.
Muslim (50) narrated from ‘Abdullah ibn Mas‘ood that the Messenger of Allah (blessings and peace of Allah be upon him) said: “There is no Prophet whom Allaah sent to any nation before me, but he had disciples and companions from among his nation who followed his path and obeyed his commands. Then after them came generations who said what they did not do and did what they were not commanded to do. Whoever strives against them with his hand is a believer; whoever strives against them with his tongue is a believer; whoever strives against them with his heart is a believer. Beyond that there is not even a mustard-seed’s worth of faith.”
The hadeeth would appear to contradict the hadeeth of Ibn ‘Abbaas, who said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “The nations were shown to me and one or two Prophets would pass by me with a group (of followers), and a Prophet who had no one with him…” Narrated by al-Bukhaari (5705) and Muslim (220).
It was also narrated by at-Tirmidhi (2446) and an-Nasaa’i from Ibn ‘Abbaas, who said: When the Prophet (blessings and peace of Allah be upon him) was taken on the Night Journey (Isra’), one or two Prophets would pass by him who had a community with them, and one or two Prophets who had a small group with them, and one or two Prophets who had no one with them, until he passed by a great multitude… Classed as saheeh by al-Albaani in Saheeh at-Tirmidhi.
We may reconcile between these hadeeths by noting that the first hadeeth is general in meaning, and the second hadeeth speaks of specific cases (not all Prophets). Most of the Prophets, the majority of them, had companions and disciples, and some of the Prophets did not have that.
Al-Qurtubi (may Allah have mercy on him) said in al-Mufhim ‘ala Saheeh Muslim: The words “There is no Prophet whom Allaah, may He be glorified and exalted, sent to any nation before me, but he had disciples and companions from among his nation” mean: there is none among the previous Messengers... What is meant by that is the majority of Messengers, not all of them, based on the fact that the Prophet (blessings and peace of Allah be upon him) said in, the hadeeth in which he spoke of the Prophets coming with their nations on the Day of Resurrection, “A Prophet will come accompanied by one man or two men, and a Prophet will come having no one with him.” This is general in meaning even though other hadeeths speaks of specific cases that were not like this.
The word hawaariyyoon (sing. hawaari) refers to the close companions of the Prophets, those who were sincere in their love towards their Prophets and were free from any faults.
Ibn al-Anbaari said: They are those who were of special character and virtue.
And it was said that they are the ones who supported their Prophets, as the Prophet (blessings and peace of Allah be upon him) said: “Every Prophet had hawaariyyoon (disciples) from among his people, and my disciple is az-Zubayr.” End quote.
Abu’l-Hasan al-Mubaarakfoori said in Mir‘aat al-Mafaateeh Sharh Mishkaat al-Masaabeeh (1/253): The words “There is no Prophet…” are to be understood as referring to what is usually the case, because it says in one hadeeth that a Prophet will come on the Day of Resurrection with no followers from among his nation except one. End quote.
And Allah knows best.