hexo: command not found 解决方案

有效,码住

https://biubiuliu.gitee.io/blog/2020/07/01/notFoundHexo/

  • terminal: which node
  • find hexo by:
    • cd .npm-global/bin
    • or finder > shift + command + . > Users > .npm-global > bin
  • pwd in terminal and copy the path
  • vi ~/.zshrc
  • input i to edit
  • input export PATH=$PATH:/Users/something/.npm-global/bin
  • esc to exit editting mode
  • input :wq to quit
  • source ~/.zshrc in terminal
  • check with hexo -v