Plugin is not a constructor
With serverless version 1.0.3: install serverless-offline (v3.2.1) ,
And create a service with
serverless create --template aws-nodejs --path myService When I add the following to the serverless.yml file
plugins:
- serverless-offline
I get teh following when I run serverless or serverless --version TypeError: Plugin is not a constructor at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:28:28)
What is your Nodejs version? This plugin is v4 and higher. Note to self: put "engines" back in package.json
node version 6.9.1
Mmm. Can you clone this repo, cd into it, npm i, cd into manual_test, npm i and npm start to see if you get the same bug?
I get the same error. I will see if I can diagnosis in the debugger
TypeError: Plugin is not a constructor at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:28:28)
Ok, maybe restart from scratch?
sudo npm uninstall -g serverless
sudo npm i -g serverless
serverless create -t aws-nodejs --path somedir
cd somedir
npm i -D serverless-offline
A clean install from scratch worked. Thanks. I had been using prior versions of serverless