1

I have gulp and bower installed globally.

For some reason, neither of them appear in npm list.

Am I going about this in the wrong way? What am I missing?

nathanbrauer@macthan:~$ npm list -g --depth=0
/usr/lib
├── colorguard@1.0.1
├── contributors@0.5.0
├── git-contributors@0.2.3
├── js-beautify@1.5.10
├── jslint@0.9.6
└── npm@2.14.12

nathanbrauer@macthan:~$ npm list -g | grep bower
nathanbrauer@macthan:~$ bower -v
1.7.2
nathanbrauer@macthan:~$ which bower
/usr/local/bin/bower
nathanbrauer@macthan:~$ ll `which bower`
lrwxrwxrwx 1 root root 35 Jan  6 12:05 /usr/local/bin/bower -> ../lib/node_modules/bower/bin/bower*
nathanbrauer@macthan:~$ ll /usr/local/lib/node_modules/
total 20
drwxr-xr-x 5 nobody nathanbrauer 4096 Jan  6 16:12 ./
drwxr-xr-x 6 root   root         4096 Jan  6 11:41 ../
drwxr-xr-x 6 nobody nathanbrauer 4096 Jan  6 12:05 bower/
drwxr-xr-x 4 nobody nathanbrauer 4096 Jan  6 16:12 es6-promise/
drwxr-xr-x 6 nobody nathanbrauer 4096 Jan  6 11:41 gulp/
Nathan J.B.
  • 10,215
  • 3
  • 33
  • 41

1 Answers1

1

It looks like things like gulp and Bower are installed in /usr/lib while the rest of your files are in /usr/local/lib. This answer suggests that npm usually installs into /usr/local/lib via symlink if you have your $PATH setup correctly (and you're not installing via sudo), so presumably you changed that variable sometime in the past.

If npm root doesn't return /usr/local/lib/node_modules then resetting your prefix variable with npm config set prefix /usr/local should do the trick.

I'd just delete the node_modules you have in /usr/lib and reinstall once your prefix is set properly.

Community
  • 1
  • 1
YPCrumble
  • 26,610
  • 23
  • 107
  • 172