已解决 建议在官方教程的npm install -g hexo-cli前加上一个sudo
@joshuawsr Maybe node & npm are installed as root user?
If node and npm is installed through Homebrew, you should have full access to /usr/local/lib/node_modules, and no sudo required. Using chown may make it work again.
Most helpful comment
If
nodeandnpmis installed through Homebrew, you should have full access to/usr/local/lib/node_modules, and nosudorequired. Usingchownmay make it work again.