Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running npm 1.2.18 and node v0.10.15. npm completion is broken. If I try to tab complete with npm or if I run npm completion, it displays:

npm ERR! System Linux 3.11.0-14-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "completion" "--color" "false" "--loglevel" "error" "--" "npm" "comple"
npm ERR! cwd /home/ajcrites
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! path /usr/share/npm/lib/utils/
npm ERR! code ENOENT
npm ERR! errno 34

Indeed, /usr/share/npm/lib/utils/ does not exist, and the current directory gets an npm-debug.log file with similar information.

A Google Search reveals a lot of complaints about this issue for varying versions of node/Debian/zsh. If I use bash, tab completion works, but npm completion yields the same error about the missing file. As far as I can tell, none of the threads that you can easiliy find from the search actually have a solution. They just seem to be bug reports.

Is there anything I can do to fix this error? Is there an example I can use or something?

share|improve this question

I found a solution by using:

Specifically I took the following file:

And extracted it to:


After restarting the console, npm in would complete to npm install!

share|improve this answer
bash: /usr/share/npm/lib/utils/ Permission denied – Tosho Sep 18 '14 at 0:45
sudo chmod +x /usr/share/npm/lib/utils/ – test30 Apr 7 at 11:51

Your Answer


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.