I am having a problem installing global node modules and everything I find online says the solve is just adding -g. Which is not the problem. I believe it\'s a linking issue
My npm couldn't find global packages as well. I did what Brad Parks suggested:
npm config set prefix /usr/local
Then I got a EACCES permissions error (DON'T USE sudo npm install -g ) and fixed it through the official npm docs: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
npm install -g awsmobile-cli
awsmobile configure