Nopik / serverless-serve

Local lambda HTTP serve plugin for Serverless framework, a.k.a. API Gateway simulator.
119 stars 19 forks source link

Trouble using serve with serverless 0.4 and 0.5 #16

Closed tcabanski closed 8 years ago

tcabanski commented 8 years ago

Tried following the readme with 0.4.1 of serverless-serve and got this error shown below. Moved to serverless 0.5 and followed the notes in an earlier issue to installl serverless-serve in the root:

npm install serverless-serve --save-dev modify s-project.json with:

"plugins": [ { "path": "serverless-serve" } ],

and then got the same error. Error is as follows

/usr/local/lib/node_modules/serverless/lib/Serverless.js:237 if (pluginMetadatum.indexOf('.') > -1 ) { ^

TypeError: pluginMetadatum.indexOf is not a function at Serverless._loadPlugins (/usr/local/lib/node_modules/serverless/lib/Serverless.js:237:27) at new Serverless (/usr/local/lib/node_modules/serverless/lib/Serverless.js:81:37) at Object. (/usr/local/lib/node_modules/serverless/bin/serverless:11:19) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Function.Module.runMain (module.js:447:10) at startup (node.js:139:18) at node.js:999:3

colwilson commented 8 years ago

looks like it no longer needs to be in the plugin director, just install as any other npm.

Nopik commented 8 years ago

This should be working now (and readme is updated), please reopen if something is still wrong.