I am trying to install Hexo globally using npm. When I run npm install -g hexo-cli
I was informed that it was installed on/Users/myusername/.node/bin/hexo -> /Users/myusername/.node/lib/node_modules/hexo-cli/bin/hexo
The problem occurs when I run hexo init blogand the hexo command is not found.
I installed Node and npm using Homebrew, so when I run which nodeand which npm, the results are /usr/local/bin/nodeand /usr/local/bin/npmrespectively.
I think that I still have the remaining files and directories when I installed Node without homebrew, but I do not want to start deleting things without knowing the consequences. Will I safely delete all files in a directory /Users/myusername/.node/? I can not understand why npm is not installed in the appropriate directory.
source
share