Actually I figured this out.
What I did was to deploy the Colyseus app to a service like Heroku, then make an index.html file containing an iframe with the URL of the app on Heroku. Then I simply upload the single index.html file onto itch.io and the game runs perfectly inside the iframe.
Alternatively you can use webpack to pack and minify the giant node_modules folder into one file, then it'll be small enough to fit onto itch.io.
I hope this helped somebody with similar problems!