A 7.7-magnitude earthquake has rocked the Solomon Islands.