I used node.js to install karma. My first try failed when running the following command on Terminal:
npm install -g karma
That failed so I dec
In your ~/.bash_profile
(or similar) amend your PATH
to include npm-installed binaries:
export PATH="$PATH:/usr/local/share/npm/bin"
I had this very same issue, and found this solution to be less time-consuming and impactful than completely re-installing node.
EDIT this has also worked for others in bash_profile
export PATH="$PATH:/usr/local/lib/node_modules/karma/bin"