2013-04-02 46 views
3

我安裝的節點,NPM和咖啡劇本,當我嘗試運行命令咖啡我得到「-bash:咖啡:命令未找到」的CoffeeScript不工作「-bash:咖啡:命令未找到」

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/local/share下/ NPM /斌/咖啡
  • 在/ usr/local/share下/ NPM /斌/蛋糕
  • 在/ usr/local/share下/ NPM/lib中/ node_modules /咖啡腳本/斌/蛋糕
  • 在/ usr/local/share下/ NPM/lib/node_modules/coffee-script/bin/coffee
  • node_modules /咖啡腳本
  • 在/ usr/local/share下/ NPM/lib中/ node_modules /咖啡腳本
  • /用戶/金石門
  • 在/ usr/local/bin目錄/節點
  • 在/ usr/local/bin目錄/ NPM
  • 〜/ bin中
  • 在/ usr/local/bin目錄
  • 在/ usr/bin中
  • /bin中
  • /usr/sbin目錄
  • /sbin目錄
  • 在/ usr/local/bin目錄

任何幫助將是巨大的!

+0

你應該在您的路徑上有目錄,而不是可執行文件(即'/ usr/local/share/npm/bin'而不是'/ usr/local/share/npm/bin/coffee'和'/ usr/local/share/npm/bin/cake') –

回答

6

是的 - 這是一個路徑問題。

你真正需要的路徑可能只是/usr/local/share/npm/bin

你並不需要添加可執行文件的路徑本身,你需要將路徑添加到他們生活中的目錄。

+0

男人,我沒看到那個地方!現在就工作,謝謝埃裏克! –