serverless-components / express

⚡ Take existing Express.js apps and host them easily on cheap, auto-scaling, serverless infrastructure (AWS Lambda and AWS HTTP API).
https://serverless.com/components
Apache License 2.0
376 stars 34 forks source link

SLS Login fails without serverless.yml file #1

Closed serverlessguru closed 4 years ago

serverlessguru commented 4 years ago

Issue: After running npm install -g serverless@components, then running sls login, I'm seeing the following error show up.

Error:

sls login

  Error --------------------------------------------------

  Error: The following file could not be found: undefined
      at Object.loadInstanceConfig (/usr/local/lib/node_modules/serverless/node_modules/@serverless/components/src/cli/utils.js:162:11)
      at Object.runningComponents (/usr/local/lib/node_modules/serverless/node_modules/@serverless/components/src/legacy.js:8:32)
      at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless.js:32:25)
      at Module._compile (internal/modules/cjs/loader.js:776:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
      at Module.load (internal/modules/cjs/loader.js:643:32)
      at Function.Module._load (internal/modules/cjs/loader.js:556:12)
      at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
      at internal/main/run_main_module.js:17:11

     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 ---------------------------
     Operating System:          darwin
     Node Version:              12.6.0
     Framework Version:         1.63.0-components-v2-beta
     Plugin Version:            3.4.1
     SDK Version:               2.3.0
     Components Version:        undefined

I was following the README here, but it looks like you can't sls login before you have a serverless.yml file so it could make sense to switch #2 and #3 to create the template first, setup your org/name/app, then sls login.

Screen Shot 2020-02-24 at 4 14 17 PM
eahefnawy commented 4 years ago

Fixed