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...
If I deploy all project
sls deploy -s mystageit works fine as expected.However, if I try to deploy only one function with
sls deploy function -f myfunction -s mystageI am getting an errorError: Invalid filenameon node_modules/adm-zip/adm-zip.js:57:19caused by this line
serverless-sentry-plugin/src/index.ts
Line 459 in b0dd2d1
Because file
.serverless/myFunction.zipdoesn't exist. In fact, whole directory is cleaned (dropped) when I runsls 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 = trueand serverless-bundle plugin).Seems that serverless-bundle plugin uses serverless-webpack under the hood and I have checked that during
sls deploy functioncommand a ZIP file inside directory.serverlessis 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...