Trying to install 'n' but getting following error:

npm isntall  -g n
/usr/lib
└── n@2.1.0 

npm ERR! Linux 3.16.0-57-generic
npm ERR! argv "node" "/usr/local/bin/npm" "isntall" "-g" "n"
npm ERR! node v0.10.25
npm ERR! npm  v3.5.3
npm ERR! path /usr/lib/node_modules/.staging
npm ERR! code ELOOP
npm ERR! errno 51

npm ERR! ELOOP, unlink '/usr/lib/node_modules/.staging'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/yeoman-start/npm-debug.log

What' s the issue and how can I handle this ?

share|improve this question
2  
you have a typo in isntall! Try npm install -g n. – Beat Jan 13 '16 at 12:13
1  
@Beat npm handles this misspelling. The issue is that the OP is getting into a dependency loop code ELOOP. – Davin Tryon Jan 13 '16 at 12:15

First, let's start with this:

 ELOOP: {
   errno: 51,
   message: 'too many symbolic links encountered'
 }

Second, I'm not sure if you have to install n via npm but if you don't, there're three more alternatives:

  1. Using make install:

    To do that, simply clone the repository (git clone https://github.com/tj/n.git), cd into the directory (cd n), and run the command.

  2. Using n-install:

    Just run curl -L http://git.io/n-install | bash command and that'll do whatever you need.

  3. Using brew:

    This is what I'd choose though. Install brew (or let's say linuxbrew) first, and then run brew install n. That's it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.