Repository navigation
Description
This is a (Bug Report )
Description
When I run serverless package --stage dit --package build the serverless-state.json still generates absolute path pointing to artifact inside of .serverless dir instead of the build. When I try to deploy the generated package using serverless deploy --stage dit --package build -vv I get an error complaining that the No function1.zip file found in the package path you provided.
If I manually go and edit the serverless-state.json inside the build dir with correct path pointing to the build dir instead of the .serverless dir then the deployment works fine.
For bug reports:
-
What went wrong?
Theserverless deploy --stage dit --package build -vvdid not work. -
What did you expect should have happened?
It should have deployed artifacts from the specified package dir. -
What stacktrace or error message from your provider did you see?
Serverless Error ---------------------------------------
No function1.zip file found in the package path you provided.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless
Your Environment Information -----------------------------
OS: darwin
Node Version: 7.4.0
Serverless Version: 1.20.2
Additional Data
-
I have multiple functions
-
I am using
package.individuallyastrue -
My use case is for build machine to perform the
packagestep and upload generated artifacts to some shared location (such as S3) and then another deployment machine to download from S3 and perform thedeploy. The directory paths on the build machine performing thepackageand the deployment machine performing thedeployare different. -
Serverless Framework Version you're using:
serverless -version
1.20.2
- Operating System:
OS X El Capitan
Version: 10.11.6
- Stack Trace:
Serverless Error ---------------------------------------
No function1.zip file found in the package path you provided.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless
Your Environment Information -----------------------------
OS: darwin
Node Version: 7.4.0
Serverless Version: 1.20.2
Activity
ahmed-abdulmoniem commentedon Jan 6, 2019
Happening with me as well.
Idanatcox commentedon Jan 10, 2019
I had the same issue, see #3525 (comment) for a workaround
Merge pull request #5297 from fruffin/fix-4188
Revert "Fixed #4188 - Package generating incorrect package artifact p…
Merge pull request #5936 from serverless/revert-5297-fix-4188
Revert "Fixed #4188 - Package generating incorrect package artifact p…
pmuens commentedon Mar 19, 2019
Re-opening since we had to revert #5297...
franciscomemoli commentedon Mar 6, 2020
Hello,
Why this merge was revert? This change had some other implication?
There is a new issue generated for this revert #6964.
If there is another bug generated by this change please tell me and I will try to fix it.
franciscomemoli commentedon Mar 6, 2020
On the lib/plugins/package/lib/zipService.js I found where the artifactFilePath is generated with an temp path, a fullpath to the .serverless folder.
I don't know why that folder is still used when the user set the package folder, may be there is a reason but if I change this to use the package folder the problem is solved.
I saw the comment but I cant find where all is moved to the package path and change the serverless-state.json functions artifact paths.
old code:
Changed code: