I am trying to learn serverless framework. I’ve encountered an problem during my practice on using serverless-s3-sync. When i tried installing the package and deploying it, I’ve encountered an error:
× Stack lesson2-dev failed to deploy (62s)
Environment: win32, node 16.17.1, framework 3.36.0 (local) 3.36.0v (global), plugin 7.1.0, SDK 4.4.0
Credentials: Local, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Cannot read file node_modules\@smithy\middleware-serde\dist-es\serdePlugin.js due to: EMFILE: too many open files, open 'C:\Users\vpp50\Projects\CloudBased\serverless_training\lesson2\node_modules\@smithy\middleware-serde\dist-es\serdePlugin.js'
PS C:\Users\vpp50\Projects\CloudBased\serverless_training\lesson2>
Here is my serverless.yml:
service: lesson2
provider:
name: aws
runtime: nodejs18.x
functions:
hello:
handler: handler.hello
plugins:
- serverless-s3-sync
custom:
s3Sync:
- bucketName: panuganbucket100898
- localDir: UploadData/
resources:
Resources:
DemoBucketUpload:
Type: AWS::S3::Bucket
Properties:
BucketName: "panuganbucket100898"
Here is my package.json:
{
"dependencies": {
"serverless-s3-sync": "^3.2.0"
}
}
Hoping someone can help me with this. Thank you.