我已经通过 npm 安装了 Connect,但无法访问它的可执行文件,我该如何安装它?
$ node -v
v0.4.7
$ npm -v
1.0.6
$ express -v
2.3.4
$ connect -v
-bash: connect: command not found
更新
我已将其添加到$PATH
:
$ npm link connect
../../node_modules/connect -> /Users/Alfred/local/lib/node_modules/connect
export PATH=$HOME/local/lib/node_modules/connect:$PATH' >> ~/.bash_profile
$PATH
-bash: /Users/Alfred/.rvm/gems/ruby-1.9.2-p0/bin:/Users/Alfred/.rvm/gems/ruby-1.9.2-
p0@global/bin:/Users/Alfred/.rvm/rubies/ruby-1.9.2p0/bin:/Users/Alfred/.rvm/bin:/Users
/Alfred/local/lib/node_modules/connect:/Users/Alfred/local/bin:/usr/bin:/bin:/usr/sbin:
/sbin:/usr/local/bin:/usr/local/lib:/usr/local/git/bin:/ usr/X11/bin: No such file or
directory
但它仍然不起作用......