I am from a non-EU country but I have a resident permit from an EU country. Do I still need a visa to visit Svalbard?
No one needs a visa to visit Svalbard, for any purpose.
There are however some practical things to consider. By far the easiest way to get to Svalbard is to fly from Norway, so you will need permission from them to transit through Norway. It looks like your EU resident card would be fine for this.
In addition, while you do not need a visa, if you plan on staying long-term, there are some conditions you need to meet, notably "sufficient means to support themselves. Therefore, it is advisable to secure housing and employment before deciding to settle in Svalbard."