Had the same problem. Don’t download npm
from aptitude
or apt-get
.
Instead try:
git clone --depth=1 git://github.com/npm/cli.git
cd cli/scripts
chmod +x install.sh
sudo ./install.sh
saw it here: NPM can’t install appjs. Error: Cannot find module ‘graceful-fs’