Open naveen-murali opened 8 months ago
Same here. The latest version generates a layer without node_modules, it contains just package-lock.json file.
Same here. I downgrade version and its working fine...
Same here, downgraded to 2.7.0
. I also saw an sdk error on the latest version when trying to run serverless deploy
... ○ Created layer package /path/to/Developer/packages/api/.serverless/layer.zip (0.2 MB)
... ○ Uploading layer package...
... ○ OK...
ServerlessLayers error:
Action: Lambda:publishLayerVersion
Params: {"Content":{"S3Bucket":"mybucket","S3Key":"serverless/blah/blah/layers/layer.zip"},"LayerName":"layername","Description":"created by serverless-layers plugin (123456789)","CompatibleRuntimes":["nodejs"],"CompatibleArchitectures":["x86_64","arm64"]}
AWS SDK error:
Could not find API configuration lambda-2015-03-31
Im too. I have the same problem. I downgraded too to 2.7.0 and still showing error on deploy =(
... ○ Uploading layer package...
... ○ OK...
ServerlessLayers error:
Action: Lambda:publishLayerVersion
Params: {"Content":{"S3Bucket":"serverless","S3Key":"serverless/service/dev/layers/altu-service-dev-nodejs-serverless.zip"},"LayerName":"altu-service-dev-nodejs-serverless","Description":"created by serverless-layers plugin (1170cc4a8683d81ff4c3125ba5f45457)","CompatibleRuntimes":["nodejs20.x"],"CompatibleArchitectures":["x86_64","arm64"]}
AWS SDK error:
Could not find API configuration lambda-2015-03-31
error
Running "serverless" from node_modules
@agutoli help us please. The project stop to upload beacause this problem. Sorry and thanks ^^
Updated: @rsi-mrobinson i changed the "serverless-layers" from devDependencies to dependencies and set the version to "2.7", yes without the third number and worked to me! \O/
If anyone is facing issues even after downgrading to 2.7.0
then cross-check package.json
by
serverless-layers
: 2.7.0
remove ^
from serverless layers if it is there!
Related to #166
I made localized modifications to the source code. This is not safe, but at least it will not prevent the normal deployment of the service.
Issue Description: After upgrading to version
v2.8.5
ofserverless-layers
, the plugin fails to include thenode_modules
directory in its generated layers.Steps to Reproduce:
serverless-layers
tov2.8.5
.Expected Behavior: The layers should contain the
node_modules
directory, including all dependencies required by the specified packages.Actual Behavior: Upon inspection of the deployed layers, we can see that the
node_modules
directory is missing.Workaround: Reverting to version
v2.7.0
ofserverless-layers
resolves the issue, as thenode_modules
directory is correctly included in the generated layers.Environment:
3.38.0
18.17.1
9.6.7
Screenshot: Here you can observe that the total layer size is much less than it should be.