Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3sync broken with Serverless Framework v4 #131

Open
tkgregory opened this issue Jun 20, 2024 · 4 comments
Open

s3sync broken with Serverless Framework v4 #131

tkgregory opened this issue Jun 20, 2024 · 4 comments

Comments

@tkgregory
Copy link

Serverless Framework is now v4. This awesome plugin stopped working.

Reproduce by updating Serverless Framework:

npm i -g [email protected]

Run s3sync.

✖ Cannot read properties of undefined (reading 'remove')
TypeError: Cannot read properties of undefined (reading 'remove')
    at C:\workspace\ab-test-demo\node_modules\serverless-s3-sync\index.js:302:22
    at <anonymous>
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

For help, try the following:
  • Run the command again with the "--debug" option
  • Run "serverless support"
  • Review the docs: https://www.serverless.com/framework/docs/

What about latest version 3?

$ npm i -g [email protected]
$ sls s3sync
Running "serverless" from node_modules
✔ Synced files to S3 buckets
✔ Synced bucket metadata
✔ Updated bucket tags    

Works fine.

The docs said v4 is backwards compatible. Maybe there's a change in the plugin integration.

@elliotmitchell
Copy link

Seconded. Getting the exact same error since upgrading serverless to v4.

@funkel1989
Copy link

Third, i also got the same error after updating to V4. It looks like the error is in the task progress handler but i'm not sure how that was adjusted or changed with the V4 changes. I'd almost ask the question do we need that? Can we just print a starting log and a finish log and remove that all together?

@dgoerdes
Copy link

dgoerdes commented Sep 4, 2024

It looks like the issue has already has been fixed and might have been related to serverless/serverless#12509

I Also provided a PR to get this plugin working along Serverless v4 without NPM complaining about peer dependencies. #135

@kyusungpark
Copy link

kyusungpark commented Nov 4, 2024

@dgoerdes were you able to resolve dependency issue with serverless v4?

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/serverless
npm error   dev serverless@"^4.4.7" from the root project
npm error
npm error Could not resolve dependency:
npm error peer serverless@"^3.0.0" from [email protected]
npm error node_modules/serverless-s3-sync
npm error   dev serverless-s3-sync@"^3.3.0" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/serverless
npm error   peer serverless@"^3.0.0" from [email protected]
npm error   node_modules/serverless-s3-sync
npm error     dev serverless-s3-sync@"^3.3.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

I had to do --legacy-peer-deps, but this is causing me issues here and there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants