I had exactly the same issue!

MMM-Sonos Version v.0.0.1 released beginning of 2024

Chnged in MMM-Sonos.js th following part
from

apiBase: 'http://localhost',

to

apiBase: 'http://192.168.1.22',

Obviously change the IP addess accordingly

For additional info my MMM-Sonos part config.js in /MagicMirror/config/config.js

{ module: 'MMM-Sonos', //header: "Sonos", position: 'top_center', // you may choose any location config: { showStoppedRoom: false, albumArtLocation: "left", } },

then it worked! With http://localhost I always got

[ERROR] Failure: Error: connect ECONNREFUSED ::1:5005

in the logs