Ben Straub
Ben Straub

Reputation: 5776

Coffeescript/cake on Windows: Cakefile can't be found

I have a ~\Cakefile that looks like this:

task 'say:hello', 'Howdy!', (options) ->
    console.log 'Hello, world!'

But running cake (which resolves to C:\Users\bstraub\AppData\Roaming\npm\cake.cmd since it was installed with npm) gives this error:

Error: Cakefile not found in C:\Users\bstraub

The file exists. What am I doing wrong?

Upvotes: 0

Views: 1088

Answers (2)

Ben Straub
Ben Straub

Reputation: 5776

path.exists and path.existsSync were broken for Windows in node 0.6.9. Updating to 0.6.13 corrects this, and cake works.

Upvotes: 1

Juve
Juve

Reputation: 10824

  1. Check if the file is really called Cakefile and not CakeFile or something.
  2. Check if ~\Cakefile maps to C:\Users\bstraub\Cakefile. The ~ might map to some other dir, depending on your system config (e.g., with cygwin, git-bash, or a funny corporate env var setup).
  3. Check if cd ~ really brings you to C:\Users\bstraub

Upvotes: 0

Related Questions