serverless-python-requirements: Error in Individual Deployment of Function

Getting an error when trying to deploy an individual function:

command: sls deploy function -f functionName


  Type Error ---------------------------------------------
 
  TypeError: Cannot read property 'artifact' of undefined

Your Environment Information --------------------------- Operating System: darwin Node Version: 10.16.0 Framework Version: 1.53.0 Plugin Version: 3.1.0 SDK Version: 2.1.1 Components Core Version: 1.1.1 Components CLI Version: 1.2.3

with this version: “serverless-python-requirements”: “^5.0.0”

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 25
  • Comments: 29

Most upvoted comments

functions:
  handler:
    handler: functions/handler.handler
    package: {} # This fixes the issue.
    events:
      - http:
          path: /map
          method: post
          cors: true

fixed it for me ty!

functions:
  handler:
    handler: functions/handler.handler
    package: {} # This fixes the issue.
    events:
      - http:
          path: /map
          method: post
          cors: true

Just put up PR (patch job) to get this working for others (and myself!). No tests yet ☠️

Any feedback or better ways to this are appreciated!