File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @serverless/aws-lambda" ,
3- "version" : " 0.1.4 " ,
3+ "version" : " 0.1.5 " ,
44 "main" : " ./serverless.js" ,
55 "publishConfig" : {
66 "access" : " public"
Original file line number Diff line number Diff line change 11const path = require ( 'path' )
22const aws = require ( 'aws-sdk' )
33const { mergeDeepRight, pick } = require ( 'ramda' )
4- const { Component, hashFile } = require ( '@serverless/components' )
4+ const { Component, hashFile, dirExists } = require ( '@serverless/components' )
55const {
66 createLambda,
77 updateLambda,
@@ -56,7 +56,11 @@ class AwsLambda extends Component {
5656
5757 config . role = config . role || ( await awsIamRole ( config ) )
5858
59- if ( config . bucket && config . runtime === 'nodejs8.10' ) {
59+ if (
60+ config . bucket &&
61+ config . runtime === 'nodejs8.10' &&
62+ ( await dirExists ( path . join ( config . code , 'node_modules' ) ) )
63+ ) {
6064 const layer = await this . load ( '@serverless/aws-lambda-layer' )
6165
6266 const layerInputs = {
You can’t perform that action at this time.
0 commit comments