auth0 / wt-cli

Webtask CLI - all you need is code
https://webtask.io
MIT License
322 stars 72 forks source link

Nodemailer require fails #164

Closed iamchathu closed 6 years ago

iamchathu commented 7 years ago

I tried to require nodemailer, I got an error

{
    "code": 400,
    "message": "Compilation failed: Unexpected token ...",
    "error": "Unexpected token ...",
    "stack": "SyntaxError: Unexpected token ...\n    at exports.runInThisContext (vm.js:53:16)\n    at Module._compile (module.js:373:25)\n    at Module._compile (/data/sandbox/lib/module.js:127:21)\n    at Object.Module._extensions..js (module.js:416:10)\n    at Module.load (module.js:343:32)\n    at Function.Module._load (module.js:300:12)\n    at Module.require (module.js:353:17)\n    at require (internal/module.js:12:17)\n    at Object.<anonymous> (/data/_verquire/nodemailer/4.1.3/node_modules/nodemailer/lib/nodemailer.js:3:16)\n    at Module._compile (module.js:409:26)"
}
kswain1 commented 6 years ago

Has anyone found a solution to this? Do they support the node mailer framework?

NotMyself commented 6 years ago

Sorry for the late reply to this issue. I took a look at the nodemailer module and it looks like they explicitly require node version 6. You can see this in the package.json.

Webtask.io currently supports node v4.8.7. We do have plans to migrate to node 8 in the future but I do not have a firm date on it yet.

All is not lost though, we recently deployed a node 8 cluster for our serverless cli support. You can deploy webtasks there as well. For instructions check this blog.