On Linux, I needed to add a folder in $HOME/.config to my path. Here is the relevant excerpt from my .bashrc
pathif() {
  if [ -d "$1" ]; then
    PATH="$1:$PATH"
  fi
}

pathif /usr/jda/bin
pathif "$HOME/bin"
pathif "$HOME/.local/bin"
pathif "$HOME/.config/yarn/global/node_modules/.bin/"
hello world