jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

Jake and Bluebird don't play well together? #301

Closed iam3yal closed 8 years ago

iam3yal commented 8 years ago

I'm not sure whether it's an issue with Jake or Bluebird but when I'm doing the following thing.

//import * as FS from "fs";
import * as Promises from "bluebird";

let fs = Promise.promisifyAll(require("fs"));

task("default", function() {
});

I'm getting the following error.

TypeError: undefined is not a function
    at Object.<anonymous> (D:\x\.out\dashboard.js:1:80)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at loadFile (c:\Users\eyal.LIONKING\AppData\Roaming\npm\node_modules\jake\lib\loader.js:81:5)
    at EventEmitter.utils.mixin.run (c:\Users\eyal.LIONKING\AppData\Roaming\npm\node_modules\jake\lib\jake.js:315:35)
    at Object.<anonymous> (c:\Users\eyal.LIONKING\AppData\Roaming\npm\node_modules\jake\bin\cli.js:25:10)

I tried to change it to the following thing and still I get the same error.

let fs = Promise.promisifyAll(new Object());

P.S. I'm using TypeScript to compile it but I don't think it has anything to do with it because the compiler compiles it just fine.

iam3yal commented 8 years ago

never mind it was a typo!