Serveless-offline plugin installation problem
Serverless Framework Version: 1.0.0-beta.2
Operating System: OS X
Expected Behavior:
I've followed steps a and b listed here: https://github.com/dherault/serverless-offline/tree/serverless_v1 Then, in step b, Upon adding the following to serverless.yml:
plugins:
- serverless-offline
And invoking "serverless", the console should display Offline as one of the plug-ins now available in your serverless project.
Actual Behavior: TypeError: Plugin is not a constructor
Stack-Trace (Optional):
TypeError: Plugin is not a constructor at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:150:28) at servicePlugins.forEach (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:186:12) at Array.forEach (native) at PluginManager.loadServicePlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:183:20) at PluginManager.loadAllPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:33:10) at service.load.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:60:28)
Thanks will check it out in a bit.
FWIW, I also just set this up today on OS X, also with 1.0.0beta2 and it's working for me... @ashachar what are your node/npm versions? Mine are:
○ → npm --version
3.8.6
○ → node --version
v6.0.0
Thanks. $ npm --version 3.10.3 $ node --version v6.3.1
I was able to replicate. This only happened to me when I used the serverless-offline 0.5 code. Can you double check that you cloned the serverless_v1 branch and overridden the code correctly inside your project? Serverless-offline 0.5 does not have a class constructor as it was not needed.
Worked like a charm, thank you Bilal.
@Bilal-S Thanks Bilal!
I have double checked and reinstalled serverless 1.0.3 and serverless-offline 3.2.1.
I am getting the follwoing when running serverless. Any ideas?
TypeError: Plugin is not a constructor at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:28:28)
Hi @tniermann , can you open a new issue about this? This is concerning, thanks.