So I have node installed together with npm. And used the official installer from the website. But when I install a package globally like "express" for example it won't be available in command line.
$ npm list -g --depth=0 /usr/local/lib/lib └── email@example.com
But on the system the modules are in:
$ npm root -g /usr/local/lib/lib/node_modules $ ll total 0 drwxrwxrwx 5 rudolfchrispens admin 160B Jul 18 11:19 . drwxrwxrwx 75 rudolfchrispens admin 2.3K Jul 18 11:23 .. drwxr-xr-x 3 rudolfchrispens admin 96B Jul 18 11:19 .staging drwxr-xr-x 3 rudolfchrispens admin 96B Jul 18 11:19 express drwxr-xr-x 24 root wheel 768B Jul 3 15:31 npm
$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/usr/local/lib $ echo $NODE_PATH /usr/local/bin
macOS Mojave 10.14.5 (18F132)
$ express -bash: express: command not found
I installed the package just using:
$ npm install express -g -loglevel=info
Without any errors...
What I already tried:
- uninstall completly
- rm all left files
- reinstall with official installer
- tried to change this property: 'npm config set prefix=/usr/local/lib' (since in some cases /usr/local/ seems to make problems because of rights
Any ideas what to try next?