The first pasuk of Vayeshev (Bereishit 37:1) does not really belong to this parsha - and the story with Yosef's dreams happened when Rachel was still alive.
This, of course, goes against all meforshim I've seen, and it might, or might not, go against the division of the parshiyot with petuchot and stumot, but read and and see for yourself.
If we look in the previous parasha, Vayishlach (36:6-37:1):
וַיִּקַּח עֵשָׂו אֶת-נָשָׁיו וְאֶת-בָּנָיו וְאֶת-בְּנֹתָיו, וְאֶת-כָּל-נַפְשׁוֹת בֵּיתוֹ, וְאֶת-מִקְנֵהוּ וְאֶת-כָּל-בְּהֶמְתּוֹ וְאֵת כָּל-קִנְיָנוֹ, אֲשֶׁר רָכַשׁ בְּאֶרֶץ כְּנָעַן; וַיֵּלֶךְ אֶל-אֶרֶץ, מִפְּנֵי יַעֲקֹב אָחִיו.
כִּי-הָיָה רְכוּשָׁם רָב, מִשֶּׁבֶת יַחְדָּו; וְלֹא יָכְלָה אֶרֶץ מְגוּרֵיהֶם, לָשֵׂאת אֹתָם--מִפְּנֵי, מִקְנֵיהֶם.
וַיֵּשֶׁב עֵשָׂו בְּהַר שֵׂעִיר, עֵשָׂו הוּא אֱדוֹם.
וְאֵלֶּה תֹּלְדוֹת עֵשָׂו, אֲבִי אֱדוֹם, בְּהַר, שֵׂעִיר.
"And Esau took his wives, and his sons, and his daughters, and all the souls of his house, and his cattle, and all his beasts, and all his possessions, which he had gathered in the land of Canaan; and went into a land away from his brother Jacob.
For their substance was too great for them to dwell together; and the land of their sojournings could not bear them because of their cattle.
And Esau dwelt in the mountain-land of Seir--Esau is Edom.
And these are the generations of Esau the father of a the Edomites in the mountain-land of Seir."...
Then there is a digression, listing Esav's descendants and Edom's kings, and then, we have Vayeshev:
וַיֵּשֶׁב יַעֲקֹב, בְּאֶרֶץ מְגוּרֵי אָבִיו--בְּאֶרֶץ, כְּנָעַן.
אֵלֶּה תֹּלְדוֹת יַעֲקֹב, יוֹסֵף בֶּן-שְׁבַע-עֶשְׂרֵה שָׁנָה...
"And Jacob dwelt in the land of his father's sojournings, in the land of Canaan.
These are the generations of Jacob. Joseph, being seventeen years old..."
These clearly go together, and the geneological lists and monarch lists just form digressions. We are told that Esav and Yaakov settled together, but they could not dwell together because of their great wealth, so Esav moved out, leaving Canaan to Yaakov. In Hebrew:
(8) וַיֵּשֶׁב עֵשָׂו בְּהַר שֵׂעִיר, עֵשָׂו הוּא אֱדוֹם.
(1) וַיֵּשֶׁב יַעֲקֹב, בְּאֶרֶץ מְגוּרֵי אָבִיו--בְּאֶרֶץ, כְּנָעַן.
(9) וְאֵלֶּה תֹּלְדוֹת עֵשָׂו, אֲבִי אֱדוֹם, בְּהַר, שֵׂעִיר.
(2) אֵלֶּה תֹּלְדוֹת יַעֲקֹב, יוֹסֵף
See the similarities? Further, the pasuk says Esav left because (pasuk 26:7) וְלֹא יָכְלָה אֶרֶץ מְגוּרֵיהֶם, the Eretz Megureihem couldn't sustain them, and Yaakov is said to settle בְּאֶרֶץ מְגוּרֵי אָבִיו, which is Canaan, which is where the pasuk says Esav moved out of. The psukim are meant to be read in parallel.
It is also not clear the order of what happens when. Rachel is alive when Yaakov first meets Esav, and the stories seem to be in order - Dinah, Yaakov's getting named Yisrael by Hashem, Rachel's death, Yitzchak's death, Esav's moving out, possibly in some inhertance settlement. But, ain mukdam umeuchar baTorah, and it could be that some of this story happened earlier, but was not mentioned in its chronological place so that the entire story of Yosef could be told from beginning to end without interruption. If so, perhaps the beginning did not happen in Canaan after Esav moved away, but even before, perhaps before or after the story with Dinah. For we are not told specific chronological information, though we can figure out some things. We know Yosef was 17 when this starts, and we know Yaakov's age when he dies in Egypt. A lot of information is calculated, and there are gaps in time which Chazal explain as Yaakov spending many years in the yeshiva of Shem and Ever. So, not all dates are concrete. A serious effort has to be made by me at some point to figure out if all this can work out chronologically, but I suspect it can.
Yosef tells his first dream to his brothers. He says they are gathering grain, and his brothers' sheaves of grain bow down to his sheaf. He does not specify how many sheaves. He then has a second dream - we are not told how much later he has this dream. He dreams the sun and moon, and eleven stars bow down to him. His father gets angry and says, Do you think I and your mother and your brothers will bow down to you. His brothers become more jealous, but his father kept watch over the matter. Then, later, his father sends him to look after his shepherding brothers, and we still don't know how old he is.
The key phrase is "Do you think I and your mother and your brothers." Yaakov understands the moon refers to Rachel. The midrash claims that Yaakov says this to point out the foolishness - how can Rachel bow down to you, if the is not alive? What Yaakov didn't realize, says the midrash, is that Bilhah was the moon, and they would bow down in Egypt. By way of note, Dinah was not meant as one of the stars, for Yaakov only mentions brothers bowing down to Yosef, not a sister.
I would suggest that Rachel was still alive when this happened, and was pregnant with Binyamin at the time. Then, Yaakov's statement referring to Yosef's mother would make sense. Also, the Torah states (37:3)
וְיִשְׂרָאֵל, אָהַב אֶת-יוֹסֵף מִכָּל-בָּנָיו--כִּי-בֶן-זְקֻנִים הוּא, לוֹ; וְעָשָׂה לוֹ, כְּתֹנֶת פַּסִּים
that Yaakov loved Yosef because he was his Ben Zekunim, child of old age. This fits Yosef being the youngest son, for otherwise he would have even more reason to love Binyamin (which he did, as we see later). It fits in nicely if Binyamin is not yet in the picture, and thus Yosef is the Ben Zekunim.