iopipe / serverless-plugin-iopipe

Automatically wrap your serverless framework functions with IOpipe
https://www.iopipe.com
Apache License 2.0
40 stars 8 forks source link

Cannot read property 'serverless-plugin-iopipe' of undefined #11

Closed yonahforst closed 7 years ago

yonahforst commented 7 years ago

trying to deploy for the first time, i get:

Yonahs-MacBook-Pro-2:physicianFinder Yonah$ export SLS_DEBUG=*
Yonahs-MacBook-Pro-2:physicianFinder Yonah$ sls deploy
Serverless: serverless-plugin-iopipe: Wrapping your functions with IO|...

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

     Cannot read property 'serverless-plugin-iopipe' of undefined

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

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

TypeError: Cannot read property 'serverless-plugin-iopipe' of undefined
    at ServerlessIOpipePlugin.checkForLocalPlugin (/usr/local/lib/node_modules/serverless-plugin-iopipe/dist/index.js:129:68)
    at /usr/local/lib/node_modules/serverless-plugin-iopipe/dist/index.js:92:13
    at next (native)
    at step (/usr/local/lib/node_modules/serverless-plugin-iopipe/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/serverless-plugin-iopipe/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
    at new Promise (/usr/local/lib/node_modules/serverless-plugin-iopipe/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:191:7)
    at /usr/local/lib/node_modules/serverless-plugin-iopipe/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
    at ServerlessIOpipePlugin.run (/usr/local/lib/node_modules/serverless-plugin-iopipe/dist/index.js:104:7)
    at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:234:55)
From previous event:
    at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:234:22)
    at PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:246:17)
    at Deploy.BbPromise.bind.then (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:79:48)
From previous event:
    at Object.Deploy.hooks.before:deploy:deploy [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:77:8)
    at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:234:55)
    at tryOnImmediate (timers.js:543:15)
    at processImmediate [as _immediateCallback] (timers.js:523:5)
From previous event:
    at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:234:22)
    at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:253:17)
    at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:97:31)
    at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:23:50)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                 darwin
     Node Version:       6.2.2
     Serverless Version: 1.12.1

I think it's because I don't have devDependencies in my package.json and https://github.com/iopipe/serverless-plugin-iopipe/blob/master/src/index.js#L103 references it