serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

Plugin destroys deployments with provider.runtime other than python.

Open mklenbw opened this issue 3 years ago • 2 comments

Are you certain it's a bug?

  • [X] Yes, it looks like a bug

Are you using the latest plugin release?

  • [X] Yes, I'm using the latest plugin release

Is there an existing issue for this?

  • [X] I have searched existing issues, it hasn't been reported yet

Issue description

If runtime in provider section is set to something not python (nodejs16.x) it will break the whole deployment.

Source: index.js


40:  pythonBin:
41:     process.platform === 'win32'
42:       ? 'python.exe'
43:       : this.serverless.service.provider.runtime || 'python',

Service configuration (serverless.yml) content

N/A

Command name and used flags

serverless package

Command output

Error: spawn nodejs16.x ENOENT

Environment information

Environment: linux, node 16.13.0, framework 3.17.0, plugin 6.2.2, SDK 4.3.2

mklenbw avatar Nov 09 '22 15:11 mklenbw

Hi @pgrzesik, I'm picking up where @mklenbw left off (thanks @mklenbw for reporting this issue and getting it started!).

To provide a bit more context, this issue is currently blocking the use of node 16 as a runtime (and probably node 14 as well) for Lambda, as it needs to be set in provider.runtime to be enabled.

I've created #773, which includes the work that @mklenbw did. The tests should be fixed now. Let me know once you've had a chance to run the tests. I ran prettify and lint locally, so hopefully there won't be any issues.

jameskbride avatar May 14 '23 12:05 jameskbride

I can confirm that patching with #773 fixes this problem. (using runtime: node18.x) God bless patch-package!

pkit avatar Sep 15 '23 16:09 pkit