FreeAllMedia / akiro

Magically compile NPM packages with native extensions for AWS Lambda.
MIT License
10 stars 1 forks source link

Error while initializing #3

Closed JonnyBGod closed 8 years ago

JonnyBGod commented 8 years ago
/Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/akiro/es5/lib/akiro/builders/nodejs/akiroBuilder.js:177
                    context.fail(error);
                            ^

TypeError: context.fail is not a function
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/akiro/es5/lib/akiro/builders/nodejs/akiroBuilder.js:177:14
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/flowsync/node_modules/async/lib/async.js:726:13
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/flowsync/node_modules/async/lib/async.js:52:16
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/flowsync/node_modules/async/lib/async.js:264:21
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/flowsync/node_modules/async/lib/async.js:44:16
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/flowsync/node_modules/async/lib/async.js:723:17
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/flowsync/node_modules/async/lib/async.js:167:37
    at /Users/joaoribeiro/Documents/Projects/cloudtasks.io/lambda/extractor/node_modules/akiro/es5/lib/akiro/builders/nodejs/akiroBuilder.js:81:6
    at ChildProcess.exithandler (child_process.js:209:5)
    at emitTwo (events.js:100:13)

Code:

const Akiro = require("akiro").default;
const akiro = new Akiro({
  region: "eu-west-1",
  bucket: "rcakirobuild",
  debug: 1
});

const iamRoleName = "AkiroBuild";

console.log("Deploying Akiro.");
akiro.initialize(iamRoleName, function (error) {
    if (error) {
        throw error;
    }
    console.log("Akiro deployed.");
});

ENV: node v5.7.1 npm 3.6.0 osx 10.11

dcrockwell commented 8 years ago

Thank you for the report. I'll look into it tonight and see what's going on.

dcrockwell commented 8 years ago

The very first time I ran your code, I received the exact same error as you did. However, every subsequent .initialize is working correctly.

In the process, I did find a different issue relating to file system index limits, so I'm issuing a fix for that right away.

I'll try a few different things to get your error to occur again so that I can fix it as well, but until then would you mind running .initialize again and seeing if you get the same error?

dcrockwell commented 8 years ago

I've published a new version (0.0.12) which fixes a file table overload error.

I've tested it with your code above with no issues. Since I can't reproduce the original error, I'm going to wait and see if you're still having issues with 0.0.12 before closing or working further on this issue.

Again, thank you for the report!

dcrockwell commented 8 years ago

Re-open if you still have an issue.