Get your Karma back with NVM
Tuesday, May 20, 2014 at 10:59AM
Ken Rimple in karma, node.js, nvm

Have you noticed that the command-line Karma runner suddenly isn't being put in the NodeJS bin directory? Yeah, me too. For people with a static NodeJS directory, installed via a package manager or hard install, you can just add this to the path:

   path-to-nvm/lib/node_modules/karma/bin

But what if you use NVM? Especially on Linux and Mac, you have a pretty cool option, especially if you use a 'default' alias for your current node installation. Put this in your .bashrc script, after your source of the nvm.sh script:

   export KARMA_DIR=~/.nvm/v`cat \
     ~/.nvm/alias/default`/lib/node_modules/karma/bin
   export PATH=$KARMA_DIR:$PATH

Then you're good to go!

Article originally appeared on Random Thoughts (http://www.rimple.com/).
See website for complete article licensing information.