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

ServerlessError: In the command you just typed, the "function" is valid but "prune" is not. #12

Closed
rentrop opened this issue Apr 21, 2016 · 7 comments

Comments

@rentrop
Copy link

rentrop commented Apr 21, 2016

After installing the function in my project root via npm install serverless-lambda-prune-plugin i do run

sls function prune and get the following error:

ServerlessError: In the command you just typed, the "function" is valid but "prune" is not.

What am i doing wrong?

Here is the full error:

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

ServerlessError: In the command you just typed, the "function" is valid but "prune" is not.  Enter "serverless help" to see the actions for this context.
  at new ServerlessError (/usr/local/lib/node_modules/serverless/lib/Error.js:17:11)
  at Serverless.command (/usr/local/lib/node_modules/serverless/lib/Serverless.js:363:31)
  at /usr/local/lib/node_modules/serverless/bin/serverless:19:16
  at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
  at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:18:4)
  at Module._compile (module.js:409:26)
  at Object.Module._extensions..js (module.js:416:10)
  at Module.load (module.js:343:32)
  at Function.Module._load (module.js:300:12)
  at Function.Module.runMain (module.js:441:10)
  at startup (node.js:134:18)
  at node.js:962:3

I am running serverless v 0.5.5

@segf4u1t
Copy link

+1

@dcroswell
Copy link

I've just gotten the same error.

@tszajna0
Copy link
Collaborator

And your s-project.json contains the "serverless-lambda-prune-plugin" in plugins, right?

@rentrop
Copy link
Author

rentrop commented Apr 22, 2016

Yes it does. My Plugin array reads as follows:

"plugins": [
    "serverless-optimizer-plugin",
    "serverless-client-s3",
    "serverless-offline",
    "serverless-cors-plugin"
  ]

Maybe there is some complication with one of the other plugins, of v 0.5.5

@tszajna0
Copy link
Collaborator

@rentrop then it's interesting; for me works fine (with a different set of plugins).
I'll check it.

@benaghaeipour
Copy link

@rentrop that list doesn't contain "serverless-lambda-prune-plugin", double check ..?

@rentrop
Copy link
Author

rentrop commented Apr 25, 2016

@benaghaeipour now it works. Thanks.

Just added wrote a pull-request as it is not mentioned in the installation guide - and i forgot it...
#13

@rentrop rentrop closed this as completed Apr 26, 2016
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

5 participants