It should run with the play method.
import wixAnimations from 'wix-animations';
$w.onReady(() => {
const timeline = wixAnimations.timeline();
const img = $w("#text2") ;
timeline.add(img, { "rotate": 360, "scale": .5,"duration": 1000 });
timeline.play(); // runs animation
})