Getting Cannot access package artifact
See original GitHub issueMy project is using serverless-package-python-functions for packaging Python functions. I’m getting this error when trying to package my functions with warmup plugin
Error:
Cannot access package artifact at "_build/{serviceName}-{stage}-warmup-plugin-default.zip" (for "warmUpPluginDefault"): ENOENT: no such file or directory, access '{serviceName}-{stage}-warmup-plugin-default.zip'
Here is my warmup config in the custom stage
warmup:
default:
enabled: false
cleanFolder: false
package:
individually: True
artifact: ${self:custom.pkgPyFuncs.buildDir}/{serviceName}-${opt:stage}-warmup-plugin-default.zip
And the config at the function I want to warmup
warmup:
default:
enabled: true
From my knowledge it’s looking for the zip file containing the content of .warmup
folder. So I tried to add the artifact
part in my warmup config, but the error still hasn’t been resolved. Would love someone could help me on this
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
`serverless package` doesn't honor the artifact and ... - GitHub
I'm trying to use the artifact and package . individually: true to have separate packages for each of my function and use the...
Read more >Artifacts not working as expected - Serverless Framework
In my build step, I run serverless package to a folder and then delete the CF templates and state file, leaving only the...
Read more >Maven cannot find package of installed artifact - Stack Overflow
I'm trying to run mvn clean install on a project and get a message after failure that says (names changed): C:\<...>\SomeClass.java:[23,29] ...
Read more >Azure Artifacts fails to get a package while using an upstream ...
I'm trying to use Maven Central as an upstream source for Maven, but it's failing with org.sonatype.sisu.inject:guice-parent:pom:2.9.1:.
Read more >Set up permissions - Azure Artifacts - Microsoft Learn
Configure Artifacts permissions for feeds, views, and pipelines. ... To access Azure Artifacts settings, select the Azure Artifacts settings ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @qngdt,
The problem is here: https://github.com/ubaniabalogun/serverless-package-python-functions/blob/c8ce439fa46534716d0ebb9fa7e63298960474b0/index.js#L40-L46
The warmup plugin does a process to reset missconfigurations applied by plugins like serverless-package-python-functions, webpack, bundle, etc.
Unfortunately, because the serverless-package-python-functions plugin doesn’t override the config but modifies. The fix doesn’t work here.
The plugin should not modify functions that are not even Python to start with. Adding a check for that would be trivial.
Another solution could be for the author of the plugin to update his code so it overrides the setting, doesn’t update the actual object:
So, unfortunately, you need to create an issue or a PR on that plugin. And it doesn’t seem very well maintained 🙁
Hi @juanjoDiaz,
I have updated the repo with the
package.json
files. Sorry I did not realize that the example repo from serverless doesn’t contain those. The error is still persist though.Thanks for still keep an eye on this issue.