node.jsnpmtowerjs

Trouble installing towerjs on ubuntu


I keep getting this error when the towerjs post install script runs

npm ERR! Error: EACCES, open '/home/claire/.npm/e18f6569-thub-com-viatropos-coffeecup-git.lock'

I've tried sudo, and -g but I think it's because the post install script doesn't include sudo. I can install coffeecup on its own, but the tower sub install fails.


Solution

  • Login with root to finish installation correctly.

    For Ubuntu:

    1. Set root password if it not defined yet:

      sudo passwd
      
    2. Change user to root

      su
      
    3. Install tower

      npm install tower -g
      

    This way works for me.

    Note: not work if you change user to root with sudo -s command. Works only with su.