Repository navigation
serverless v0.5 and optimizer #23
Copy link
Copy link
Open
Description
I'm testing the v0.5 branch for the serverless guys and looks like there is a problem with the optimizer plugin and the new code. I'm able to deploy without issue if serverless-optimizer-plugin is not included in the s-project.json plugins, however once included I get the following:
Serverless: Deploying functions in "development" to the following regions: us-east-1
Serverless: ------------------------
Serverless: Failed to deploy the following functions in "development" to the following regions:
Serverless: us-east-1 ------------------------
Serverless: listaccounts: Cannot read property 'getFunctions' of undefined
/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:49
fn = function () { throw arg; };
^
ServerlessError: Lambda Deployment Failed.
at new ServerlessError (/usr/local/lib/node_modules/serverless/lib/Error.js:17:11)
at FunctionDeploy.<anonymous> (/usr/local/lib/node_modules/serverless/lib/actions/FunctionDeploy.js:137:19)
at next (/usr/local/lib/node_modules/serverless/node_modules/rimraf/rimraf.js:74:7)
at FSReqWrap.CB [as oncomplete] (/usr/local/lib/node_modules/serverless/node_modules/rimraf/rimraf.js:110:9)
From previous event:
at FunctionDeploy.functionDeploy (/usr/local/lib/node_modules/serverless/lib/actions/FunctionDeploy.js:116:10)
From previous event:
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:188:29
at Array.reduce (native)
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:187:30
From previous event:
at Serverless._execute (/usr/local/lib/node_modules/serverless/lib/Serverless.js:185:10)
at Serverless.actions.(anonymous function) (/usr/local/lib/node_modules/serverless/lib/Serverless.js:407:20)
at Serverless.command (/usr/local/lib/node_modules/serverless/lib/Serverless.js:376:38)
at /usr/local/lib/node_modules/serverless/bin/serverless:19:16
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:18:4)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3
Metadata
Metadata
Assignees
Labels
No labels
Activity
austencollins commentedon Mar 19, 2016
Thanks, still fixing this. Almost done :)
ajagnanan commentedon Mar 19, 2016
Should be good with #27 😄
purplecones commentedon Mar 23, 2016
I get this error just by adding
"serverless-optimizer-plugin"to the plugins array ins-project.json.and just running
slsmartinmicunda commentedon Mar 23, 2016
I am getting exactly same error like @purplecones (serverless
v0.5.0)ajagnanan commentedon Mar 23, 2016
You should install latest master, install it by adding this to package.json
martinmicunda commentedon Mar 23, 2016
thanks @ajagnanan
patoncrispy commentedon Apr 8, 2016
Using babelify and trying to run a function, I get the following error:
My
s-project.jsonhas this defined:My dependencies are:
Any ideas why I would be getting this error?
martinmicunda commentedon Apr 8, 2016
@patoncrispy you need to specify custom settings in
s-function.jsonsinceserverless 0.5.0.. see issue #30patoncrispy commentedon Apr 8, 2016
So should I not have anything in my
s-project.json, @martinmicunda? The docs suggest the following format:martinmicunda commentedon Apr 8, 2016
you only move optimize config to
s-function.jsonand everything else stay ins-project.jsons-function.json