I've installed Connect via npm but can't access it's executable, how do I install it?
$ node -v
v0.4.7
$ npm -v
1.0.6
$ express -v
2.3.4
$ connect -v
-bash: connect: command not found
Update
I've added it to the $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开发者_StackOverflow/bin:/usr/local/lib:/usr/local/git/bin:/ usr/X11/bin: No such file or
directory
But it still don't work...
node
as a bash executable runs you a node interpreter.
npm
as a bash executable allows you to use npm to install programs.
express
as a bash executable sets up boilerplate code for.
connect
as a bash executable does nothing. This is normal.
All modules do nothing by default. npm, node and express are exceptions.
Note that npm has some kind of API to find the version of connect
精彩评论