You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
results in scandir '.serverless/src/func1/requirements'
update 2:
As the module is used as the root dir, and requirements are only packed for functions with a python runtime, I can make sls dist succeed by assigning the python module dir to the nodejs function:
where src/empty_python only contains an empty requirements.txt.
Because it is specified first, it's requirements (which there are none) will be saved, and then reused by the nodejs functions.
Not pretty, but at least it works for now.
gerbenoostra
changed the title
Mixing js and python results in "ENOENT: no such file or directory, scandir '.serverless/requirement"
Mixing nodejs and python results in "ENOENT: no such file or directory, scandir '.serverless/requirement"
Mar 23, 2022
Are you sure this doesn't still happen without node? I'm using just a single python function, and this happens as soon as I add zip: true (or layer: true which implicitly zips).
Uh oh!
There was an error while loading. Please reload this page.
I'm having lambda's of both the python and nodejs runtime. When building the dist, it results in the following error:
My
serverless.yml
contains:My filetree structure is:
I see a
unzip_requirements.py
being created in the project rootA quick check in the sourcecode at
serverless-python-requirements/lib/zip.js
Line 116 in 3a898e5
this.targetFuncs
to determine for which functions to create a zip.However, the
inject.js
filters thethis.targetFuncs
on the python runtime atserverless-python-requirements/lib/inject.js
Line 109 in 3a898e5
Shouldn't all occurrences of
this.targetFuncs
be replaced with one that filters on the runtime?update 1:
Note that if I add a
module
to the js function, the mentioned scandir in the exception changes.For example:
results in
scandir '.serverless/src/func1/requirements'
update 2:
As the module is used as the root dir, and requirements are only packed for functions with a python runtime, I can make
sls dist
succeed by assigning the python module dir to the nodejs function:The text was updated successfully, but these errors were encountered: