2

I have a simple hello world jake file, which gives an error:

victors-macbook-pro:votefor Victor$ jake -f jakefile asynchronous

(in /Users/Victor/Documents/workspace/votefor/votefor) Error on line 1 of file [unknown] ReferenceError: Can't find variable: desc

victors-macbook-pro:votefor Victor$ cat jakefile

desc('This is an asynchronous task.');
task('asynchronous', [], function () {
      setTimeout(function () {
          console.log("Yay, I'm asynchronous!");
          complete();
    }, 1000);
}, true);

Is there anything that i am doing wrong ?

The code was copied and pasted from http://howtonode.org/intro-to-jake

alcedo
  • 1,632
  • 2
  • 12
  • 14

1 Answers1

2

You have to execute it like this

jake -f path_to_file.js asynchronous

Be sure to install it globally (I got npm WARN prefer global jake@0.5.16 should be installed with -g)

npm install jake -g
user568109
  • 47,225
  • 17
  • 99
  • 123
  • many thanks. i tried what you said, but to no avail. i've updated my question with all the commands i tried too – alcedo Jun 22 '13 at 07:20