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

Stuck at moveArtifactsToPackage during package cmd and Successfully published on deploy #124

Closed
bkniffler opened this issue May 6, 2021 · 7 comments · Fixed by #125
Closed
Labels
bug Something isn't working released

Comments

@bkniffler
Copy link

I'm using serverless 2.39.0, also tried 2.38.0. Both package and deploy commands get stuck at the end and fail to exit the process without any clear error. Outputs are below and are with verbose+debug enabled.

Tried different configs, but it keeps on hanging on that moveToArtifactsToPackage step. Deploying still does work though, but the process will need to be cancelled with ctrl+c.

If I exchange serverless-esbuild with serverless-bundler, the process exits correctly.

Logs (package)

....
Serverless: Packaging service...
Serverless: Installing dependencies for custom CloudFormation resources...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage

Logs (deploy)

....
Serverless: Invoke aws:deploy:finalize
Serverless: Removing old service artifacts from S3...
Serverless: Publishing service to the Serverless Dashboard...
Serverless: Successfully published your service to the Serverless Dashboard: xxxx

Config

custom:
  esbuild:
    packager: npm
    bundle: true
    minify: false
    sourcemap: true
    target: node14
    watch:
      pattern: ['./index.ts', 'src/**/*.ts'] # default .
      ignore: ['.serverless/**/*', '.build'] # default ['.build', 'dist', 'node_modules']

Any idea what could be wrong?

@olup
Copy link
Contributor

olup commented May 6, 2021

Hi ! Could you post your complete serverless.yml in order to get more context ?

@olup
Copy link
Contributor

olup commented May 6, 2021

Actually I just updated to lastest serverless-esbuild and my deploys are also hanging. Will try to debug.

@olup olup added the bug Something isn't working label May 6, 2021
@olup
Copy link
Contributor

olup commented May 6, 2021

Bug not happening in 1.10.4

@olup
Copy link
Contributor

olup commented May 6, 2021

So It might be that we need to actively call result.rebuild.dispose() as we are now using incremental. Also, incremental build are only needed on offline mode (not with invoke or build or package)
https://esbuild.github.io/api/#incremental
in src/index.ts

@bkniffler
Copy link
Author

Hey @olup, thanks for getting on this so quickly! I've downgraded to 1.10.4 and it works great :)

If there is anything you'd like me to attach, let me know, but looks like you found the cause already.

@olup
Copy link
Contributor

olup commented May 6, 2021

yeah, I think so, thanks @bkniffler a lot for raising the error early, will revert once I have time to implement the fix

@github-actions
Copy link

github-actions bot commented May 6, 2021

🎉 This issue has been resolved in version 1.10.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants