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 1
1
{
2
2
"name" : " @serverless/aws-lambda" ,
3
- "version" : " 0.1.4 " ,
3
+ "version" : " 0.1.5 " ,
4
4
"main" : " ./serverless.js" ,
5
5
"publishConfig" : {
6
6
"access" : " public"
Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' )
2
2
const aws = require ( 'aws-sdk' )
3
3
const { mergeDeepRight, pick } = require ( 'ramda' )
4
- const { Component, hashFile } = require ( '@serverless/components' )
4
+ const { Component, hashFile, dirExists } = require ( '@serverless/components' )
5
5
const {
6
6
createLambda,
7
7
updateLambda,
@@ -56,7 +56,11 @@ class AwsLambda extends Component {
56
56
57
57
config . role = config . role || ( await awsIamRole ( config ) )
58
58
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
+ ) {
60
64
const layer = await this . load ( '@serverless/aws-lambda-layer' )
61
65
62
66
const layerInputs = {
You can’t perform that action at this time.
0 commit comments