Don't use the old version of "accepts", which requires a version of "negotiator" using dynamic requires.
This is causing an old and broken version of has-cors to get installed when you try and install socket.io.