Skip to content

Unable to deploy single functions (similar to #189) #218

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

Closed
gastonrod07 opened this issue Jul 12, 2018 · 2 comments
Closed

Unable to deploy single functions (similar to #189) #218

gastonrod07 opened this issue Jul 12, 2018 · 2 comments

Comments

@gastonrod07
Copy link

gastonrod07 commented Jul 12, 2018

I have the same issue as in #189. When I run sls deploy -f one --stage dev I get:

Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command requirements
Serverless: Load command requirements:clean
Serverless: Load command requirements:install
Serverless: Invoke deploy
Serverless: Invoke deploy:function
Serverless: Installing requirements of one/requirements.txt in .serverless/one...
Serverless: Docker Image: lambci/lambda:build-python3.6
Serverless: Installing requirements of two/requirements.txt in .serverless/two...
Serverless: Docker Image: lambci/lambda:build-python3.6
Serverless: Invoke package:function
Serverless: Packaging function: one...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...

  Type Error ---------------------------------------------

  path must be a string or Buffer

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

TypeError: path must be a string or Buffer
    at fs.readFile (fs.js:358:11)
    at go$readFile (/Users/gaston/my-service/node_modules/graceful-fs/graceful-fs.js:73:14)
    at Object.readFile (/Users/gaston/my-service/node_modules/graceful-fs/graceful-fs.js:70:12)
    at Object.readFile (/Users/gaston/my-service/node_modules/universalify/index.js:5:67)
    at moveModuleUp (/Users/gaston/my-service/node_modules/serverless-python-requirements/lib/inject.js:58:6)
    at BbPromise.resolve.filter.map.map.func (/Users/gaston/my-service/node_modules/serverless-python-requirements/lib/inject.js:104:18)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           8.9.3
     Serverless Version:     1.28.0

serverless.yml:

service:
  name: my-service-name
  awsKmsKeyArn: ${file(./config-${opt:stage}.yml):awsKmsKeyArn}

provider:
  name: aws
  runtime: python3.6
  region: us-west-2
  stage: ${opt:stage}
  profile: ${opt:aws-profile}
  role: my-role
  timeout: 120
  memorySize: 128

plugins:
  - serverless-python-requirements
  - serverless-pseudo-parameters

custom:
  pythonRequirements:
    dockerizePip: non-linux
  accountId: "#{AWS::AccountId}"

package:
  individually: true

resources:
  ...

functions:
  one:
    handler: main.handle
    module: ./one
    package:
      include:
      - ./one/main.py

  two:
    handler: main.handle
    module: ./two
    package:
      include:
      - ./two/main.py

npm list

$ npm list
├── [email protected]
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected] deduped
  │ └── [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ ├── [email protected] deduped
  │ │ │ └── [email protected]
  │ │ ├── [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ └─┬ [email protected]
  │ │ │   ├── [email protected]
  │ │ │   └── [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ └── [email protected] deduped
  │ │ └── [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   ├── [email protected]
  │   ├── [email protected] deduped
  │   ├── [email protected]
  │   ├── [email protected]
  │   ├── [email protected]
  │   └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  └─┬ [email protected]
    └── [email protected] deduped
@chrroo7
Copy link

chrroo7 commented Jul 20, 2018

on the same lines, with python

Serverless: Injecting required Python packages to package...

Type Error ---------------------------------------------

Cannot read property 'artifact' of undefined

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Stack Trace --------------------------------------------

TypeError: Cannot read property 'artifact' of undefined
at BbPromise.resolve.filter.map.map.map.func (/Users/ranga.reddy/ama-dev/git-repo/att/att-notification-platform/node_modules/serverless-python-requirements/lib/inject.js:113:23)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
at PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:408:17)
at Deploy.BbPromise.bind.then.then (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:118:50)
From previous event:
at Object.before:deploy:deploy [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:113:10)
at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:390:55)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:421:17)
at variables.populateService.then.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:163:33)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:150:8)
at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:42:50)

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information -----------------------------
OS: darwin
Node Version: 6.14.1
Serverless Version: 1.28.0

@miketheman
Copy link
Contributor

Hey there!
Going through old issues, and these are performed against old versions of node, servereless, servereless-python-requirements - so I'm going to close this issue.
If you're still experiencing a failure condition, please open a new issue and provide all relevant debugging data to assist with reproduction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants