-
Notifications
You must be signed in to change notification settings - Fork 293
Functions without requirements fail to package #194
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
Comments
mind sharing your |
Hi. I think the key part from your answer is "not per function". I've just tested this yml: service: requirements-test
provider:
name: aws
runtime: python3.6
package:
individually: true
exclude:
- "**/*"
functions:
func1:
handler: func1/index.handler
module: func1
include:
- function1/index.py
func2:
handler: func2/index.handler
include:
- function2/index.py
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
invalidateCaches: true
dockerizePip: false If you create those two functions and don't add a λ ~/tmp/requirements-test/ sls package
Serverless: Installing requirements of func1/requirements.txt in .serverless/func1...
Error --------------------------------------------------
ENOENT: no such file or directory, open 'requirements.txt'
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 8.5.0
Serverless Version: 1.27.3 For the moment, I cant get rid of the error just by adding an empty |
Thanks for the details. That's a 🐛 For now I recommend the workaround you mention of an empty |
- skip requirement generation, if no requirements file is present
- skip requirement generation, if no requirements file is present
I have a service with several Python functions in it. Only a couple of them need extra Python packages, so I added a
requirements.txt
file only for those and set the module for each function.The problem seems to be that the plugin always expects a requirements file to install for all Python functions so for those that don't have one, it fails with this error:
Is there a way to omit certain functions? Or am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: