Skip to content

Uploading source map doesn't work when deploying function only #67

@fancywriter

Description

@fancywriter

If I deploy all project sls deploy -s mystage it works fine as expected.
However, if I try to deploy only one function with sls deploy function -f myfunction -s mystage I am getting an error Error: Invalid filename on node_modules/adm-zip/adm-zip.js:57:19

caused by this line

const zip = new AdmZip(artifact);

Because file .serverless/myFunction.zip doesn't exist. In fact, whole directory is cleaned (dropped) when I run sls deploy function.

Serverless version 3.10.1, sentry plugin 2.5.3.

I guess it should work the following - if file exists, reuse it, if not - build and pack it (and only one function). (I use package.individually = true and serverless-bundle plugin).

Seems that serverless-bundle plugin uses serverless-webpack under the hood and I have checked that during sls deploy function command a ZIP file inside directory .serverless is actually created... however after that it is deleted before hook of sentry-plugin is called... I am still not sure which issue is it exactly, which of the plugin or the framework itself...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions