学习Angular.js,也就很荣幸的用到了单元测试。
安装karma报错,optional dep failed
apart from the error you are getting (which is reported by npm / socket.io) you shouldn't be installing Karma globally. Only a CLI should be installed globally:
npm install -g karma-cli
See: http://karma-runner.github.io/0.12/intro/installation.html
问题解决。