Coffeescript + node.js : Unexpected token > (function arrow)

When I try to run the following coffeescript code:

request = require('request')
request('http://google.com', (error, response, body) ->
    if not error and response.statusCode is 200
        console.log(body)
)

I get the following error:

request('http://google.com', (error, response, body) ->
                                                      ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3

But when I run it on the coffeescript.org's compiler, it spits out the correct javascript. Any idea what's going on?

When I looked for coffeescript's version on the terminal, it couldn't find it. So I exported coffescript's path by adding the following line to bashrc:

export PATH=/usr/local/share/npm/lib/node_modules/coffee-script/bin/:$PATH

This resolved the issue