Installing the new package npm i @stomp/stompjs seems to have solved this for me.
npm i @stomp/stompjs