jeremydaly / serverless-cloudside-plugin

Serverless plugin for using cloudside resources during local development
47 stars 16 forks source link

Crash on SLS 2.23.0 #12

Open Wintereise opened 3 years ago

Wintereise commented 3 years ago

Hi,

Been using this plugin for a long time now, but it appears 2.22+ crashes on bootstrap.

Serverless: Loading cloudside resources for 'api-staging' stack.

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

  TypeError: this.serverless.getProvider(...).request(...).then(...).error is not a function
      at InvokeCloudside.loadCloudsideEnvVars (~/code/node_modules/serverless-cloudside-plugin/index.js:230:10)
      at InvokeCloudside.tryCatcher (~/code/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (~/code/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (~/code/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (~/code/node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (~/code/node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (~/code/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (~/code/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (~/code/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:461:21)

It can't find error, but it can find catch (https://github.com/jeremydaly/serverless-cloudside-plugin/blob/33708ff196921f8b2f1c79a350c500c329327d0c/index.js#L230)

I made the change, and it works fine now. Just a heads up for anyone else running into this.

Wintereise commented 3 years ago

PR raised by Piotr from the SLS team fixes this - https://github.com/jeremydaly/serverless-cloudside-plugin/pull/13

@jeremydaly Can you please give it a look over and merge when you have a moment?