CoffeeScript无法运行" -bash:coffee:命令未找到"

时间:2013-04-02 15:10:25

标签: coffeescript npm

我安装了node,npm和coffee脚本,当我尝试运行coffee命令时,我得到“-bash:coffee:command not found”

http://cl.ly/image/1Z2t1U1O1I0z

我不确定$ PATH是否错误,所有谷歌搜索结果都表明我的问题。很明显我是新手,我有点过火但是我试着添加了每一条路,但是我给了我:

$path = /usr/local/share/npm/bin/coffee:/usr/local/share/npm/bin/cake:/usr/local/share/npm/lib/node_modules/coffee-script/bin/cake:/usr/local/share/npm/lib/node_modules/coffee-script/bin/coffee:node_modules/coffee-script:/usr/local/share/npm/lib/node_modules/coffee-script:/Users/asmith:/usr/local/bin/node:/usr/local/bin/npm:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

人类可读:

  • 的/ usr /本地/共享/ NPM / bin中/咖啡
  • 的/ usr /本地/共享/ NPM / bin中/蛋糕
  • 在/ usr / local / share下/ NPM / lib中/ node_modules /咖啡脚本/斌/蛋糕
  • 在/ usr / local / share下/ NPM / lib中/ node_modules /咖啡脚本/斌/咖啡
  • node_modules /咖啡脚本
  • 的/ usr /本地/共享/ NPM / LIB / node_modules /咖啡脚本
  • / Users / asmith
  • 的/ usr / local / bin中/节点
  • 的/ usr / local / bin中/ NPM
  • 〜/ bin中
  • 的/ usr / local / bin中
  • 的/ usr / bin中
  • / bin中
  • / usr / sbin目录
  • / sbin目录
  • 的/ usr / local / bin中

任何帮助都会很棒!

1 个答案:

答案 0 :(得分:6)

是的 - 这是路径问题。

您实际需要的路径可能只是/usr/local/share/npm/bin

您不需要添加可执行文件本身的路径,您需要添加它们所在目录的路径。