I am in Norway with an expiring visitor visa. Can I stay in Norway?
A visitor visa can never be extended beyond 90 days. If you have a visitor visa that is expiring, you must return home. If you are in Norway longer than allowed, this can lead to you being deported from Norway/Schengen.
If you qualify to apply for a residence permit in Norway, you can apply before your visa expires. As a general rule, you must be a skilled worker to be able to apply from Norway.
For applications for family immigration, there are separate rules for applying from Norway. Follow the guide on this page to read about the requirements to be approved for family immigration and whether you can hand in the application in Norway.