Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install not effective unless in package.json #42

Open
picsoung opened this issue Apr 17, 2016 · 0 comments
Open

install not effective unless in package.json #42

picsoung opened this issue Apr 17, 2016 · 0 comments

Comments

@picsoung
Copy link

I had some issues while installing this plugin.

Tried to install running npm install serverless-optimizer-plugin --save
and added "plugins": ["serverless-optimizer-plugin"] on s-project.json file.

But after that running any sls command gave me an error:

sls                                                            ⏎
/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:61
        fn = function () { throw arg; };
                           ^

ServerlessError: This plugin could not be found: serverless-optimizer-plugin
    at new ServerlessError (/usr/local/lib/node_modules/serverless/lib/Error.js:17:11)
    at Serverless._loadPlugins (/usr/local/lib/node_modules/serverless/lib/Serverless.js:298:17)
    at Serverless.loadProjectPlugins (/usr/local/lib/node_modules/serverless/lib/Serverless.js:245:10)
    at /usr/local/lib/node_modules/serverless/lib/Serverless.js:76:41
From previous event:
    at Serverless.init (/usr/local/lib/node_modules/serverless/lib/Serverless.js:72:25)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:17:12)
    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

The only to make it work for me was to create an package.json file at project root and add this line in dependencies

"serverless-optimizer-plugin": "https://github.com/serverless/serverless-optimizer-plugin.git"

Unfortunately I have no idea what went wrong before ... so I can't really help solving this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant