viamcc
V2EX  ›  Node.js

求教 mac 突然出现 -bash: hexo: command not found

  •  
  •   viamcc · Jan 19, 2018 · 9315 views
    This topic created in 3211 days ago, the information mentioned may be changed or developed.
    RT

    前一秒还在正常使用,随后就出现了 -bash: hexo: command not found ,没有做过其他更改配置文件的操作。

    node 重新安装了好几次使用 brew 和 官网 pkg 安装包都试过正常安装,安装 hexo 的时候 npm install hexo-cli -g 也正常,但就是 hexo 找不到命令。

    目前 node、nvm、npm 命令都正常。

    系统版本:High Sierra 10.13.2
    node v8.9.3
    npm 5.5.1
    nvm 0.33.2
    hexo [email protected]
    13 replies  •  2018-07-31 16:42:00 +08:00
    yagokoro
    yagokoro
    Jan 19, 2018 via Android
    1
    看上就买,不行就分,重启试试

    认真:先重启试试,不行的话看看是不是 npm 炸了,以前用非 sudo 切换 node 版本很容易把 npm 搞坏
    yangg
    yangg
    Jan 19, 2018
    2
    hash hexo
    mason961125
    mason961125
    Jan 19, 2018
    3
    where hexo
    viamcc
    viamcc
    OP
    Jan 19, 2018
    4
    @yagokoro 重启过了的,还是不行。

    @yangg @mason961125 这两个命令都没有,难道我环境变量出问题吗? cd more cat mkdir 这些都正常啊
    gl09025
    gl09025
    Jan 19, 2018
    5
    echo $PATH 看看有没有 /Users/你的用户名 /.nvm/versions/node/v9.3.0/bin
    rsl140
    rsl140
    Jan 19, 2018
    6
    我也出现过 我记得我是环境变量的锅
    viamcc
    viamcc
    OP
    Jan 19, 2018
    7
    @rsl140 怎么解决的?环境变量能 share 下么?=。=
    wangking
    wangking
    Jan 19, 2018
    8
    我问一句题外话,进了你的帖子,背景变了,你是怎么做到的
    cheneydc
    cheneydc
    Jan 19, 2018
    9
    @wangking 我也发现了,试了几次发现应该是所在主题的背景
    skylancer
    skylancer
    Jan 19, 2018
    10
    @wangking
    @cheneydc 节点的背景
    hackshen
    hackshen
    Jan 19, 2018
    11
    sudo npm install hexo-cli -g
    jcpwfloi
    jcpwfloi
    Jan 22, 2018❤️1
    12
    yarn global add hexo-cli
    tmy1995hflc
    tmy1995hflc
    Jul 31, 2018
    13
    @jcpwfloi 成功了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1068 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 21:26 · PVG 05:26 · LAX 13:26 · JFK 16:26
    ♥ Do have faith in what you're doing.