You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serverless: ------------------------
Serverless: Failed to deploy the following functions in "carmine" to the following regions:
Serverless: us-east-1 ------------------------
Serverless: clientApi: Unexpected token: name (process)
C:\Users\...\npm\node_modules\serverless\node_modules\bluebird\js\release\async.js:61
fn = function () { throw arg; };
This is serverless-optimizer-plugin v2.5.1. Code is running fine on Lambda when I remove the optimizer plugin.
Yeah, & now I wonder ... does Babel always convert back to pre-ES2015? Because I'm using the Node 4.3 executable on AWS right now ... perhaps Babel has less to do now?
Yes, same issue here. I also think that Babel is no longer needed and, thus, am not using it.. but then hit errors on my ES6 compatible statements (e.g. "let", but wondering, now, if I am missing a fundamental and should start saying "ES2015" from now on).
The one thing I have managed to figure out is that Uglify is the culprit here, as it is the one lacking ES6 support, but I think @Aendrew eluded to that already.
I believe es2015 unnecessarily transpiles a lot of ES6 logic that is natively supported in the Node 4.3.x Lambda (V8) Execution Environment. For deployed (code size and speed), es20515-node4 makes the most sense for ES6-based solutions and needs to be fixed.
If you're looking at using optimizer simply to make fully es6 run on lambda, just set "minify": false in the "optimize" config. This should be fixed though.
Activity
aendra-rininsland commentedon Apr 29, 2016
I have the same thing. It's an arrow function that's causing it. It seems Babelify isn't being run on stuff before uglify.
cdichiara commentedon Apr 30, 2016
Yeah, & now I wonder ... does Babel always convert back to pre-ES2015? Because I'm using the Node 4.3 executable on AWS right now ... perhaps Babel has less to do now?
vmadman commentedon May 6, 2016
Yes, same issue here. I also think that Babel is no longer needed and, thus, am not using it.. but then hit errors on my ES6 compatible statements (e.g. "let", but wondering, now, if I am missing a fundamental and should start saying "ES2015" from now on).
The one thing I have managed to figure out is that Uglify is the culprit here, as it is the one lacking ES6 support, but I think @Aendrew eluded to that already.
n8sabes commentedon May 13, 2016
See: serverless/serverless#1016
See: serverless-runtime-babel #16
I believe
es2015unnecessarily transpiles a lot of ES6 logic that is natively supported in the Node 4.3.x Lambda (V8) Execution Environment. For deployed (code size and speed),es20515-node4makes the most sense for ES6-based solutions and needs to be fixed.Howard3 commentedon Jun 17, 2016
If you're looking at using optimizer simply to make fully es6 run on lambda, just set
"minify": falsein the "optimize" config. This should be fixed though.cdichiara commentedon Jul 5, 2016
Thanks @Howard3, this was really helpful as a stopgap solution...
AdrienLemaire commentedon Jul 22, 2016
Thank you @Howard3 , I could never use optimizer due to these kind of errors, and I can now reduce my zip files from 3.3M to 540K even without minify