I'm experiencing some issues with my local environment.
I'm using:
All of the above were initially installed via homebrew.
Issues:
The node versions I use regularly are 0.10.48 and 6.9.2 - but mostly 4.6.2.
I've created some aliases in fish to be able to get the the global modules to run. I'd prefer to address the root cause rather than continue applying further bandaids though.
Extra info:
~> npm config get prefix
/Users/me/.npm-packages
~> npm bin
/Users/me/node_modules/.bin
What happens when I try to update npm:
~> npm install -g npm@3
/Users/me/.npm-packages/bin/npm -> /Users/me/.npm-packages/lib/node_modules/npm/bin/npm-cli.js
npm@3.10.10 /Users/me/.npm-packages/lib/node_modules/npm
~> npm -v
2.15.9
When I try to call a global module:
~> gulp
fish: Unknown command 'gulp'
What I've tried in order to fix the global modules:
~> cat ~/.config/fish/config.fish
set fish_user_paths /Users/me/.npm-packages
ls ~/.config/fish/functions
bower.fish ember.fish pm2.fish
~> cat ~/.config/fish/functions/bower.fish
function bower
/Users/me/.npm-packages/bin/bower $argv;
end
Any help you can provide will be greatly appreciated! I've been trying to fix this for awhile now without any luck!
I resolved this by completely uninstalling (and deleting any traces of) node
, npm
and n
, uninstalling fish
shell and changing to zsh
instead.
Afterwards, I installed nvm
and used it to restore node
on my machine.
Global npm modules now work.