在 mac 终端上找不到 jsx 命令

jsx command not found on mac terminal

问题:

相关信息:

环境信息:

   $ node -v
    v0.12.4
   $ npm
    2.10.1

google 之最:

补充说明:

针对我的独特问题的解决方案

运行 这个:

npm config get prefix

这将为您提供有关全局 npm 模块安装位置的线索。您需要将上述return目录下的bin目录添加到您的路径中。例如,它可能 return /usr/local,在这种情况下,您应该将 /usr/local/bin 添加到您的 PATH 中。你可以这样做:

export PATH=$PATH:$(npm config get prefix)/bin