JS tests fail locally

I've deleted node_modules/ and uninstalled some globally installed packages. Installs result in some deprecation errors, but everything else seems OK.

$ npm test

> Elgg@ test /Users/steve/Sites/local/elgg-master
> node_modules/karma/bin/karma start js/tests/karma.conf.js --single-run

/Users/steve/Sites/local/elgg-master/node_modules/socket.io/lib/store.js:35
Store.prototype.__proto__ = EventEmitter.prototype;
                                        ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/Users/steve/Sites/local/elgg-master/node_modules/socket.io/lib/store.js:35:41)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/steve/Sites/local/elgg-master/node_modules/socket.io/lib/manager.js:16:13)
    at Module._compile (module.js:573:32)