I'm trying to install Hexo globally using npm. When I run
npm install -g hexo-cli
I'm informed that it was installed to /Users/myusername/.node/bin/hexo -> /Users/myusername/.node/lib/node_modules/hexo-cli/bin/hexo
The problem comes in when I run hexo init blog
and the hexo command is not found.
I installed Node and npm with Homebrew, so when I run which node
and which npm
, the results are /usr/local/bin/node
and /usr/local/bin/npm
respectively.
I'm thinking that I still have leftover files and directories from when I installed Node without homebrew, but I don't want to start deleting things without fully knowing the repercussions. Would I be safe to delete all files located in the /Users/myusername/.node/
directory? I can't figure out why npm is not installing to the proper directory.