serverless / serverless-client-s3

A plugin to deploy front-end assets to S3 via the Serverless Framework
http://www.serverless.com
171 stars 61 forks source link

yaml exception with example code in README #54

Open paolini opened 7 years ago

paolini commented 7 years ago

In REAMDE.md you suggest to add these line to serverless.yml:

plugins:
  - serverless-client-s3
 custom:
   client:
     bucketName: serverless-client-bucketname

however this seems not to be valid yml. When executing serverless client deploy I get the following YAML exception:

  bad indentation of a mapping entry in "/Users/paolini/notes/serverless.yml" at line 59, column 2:
     custom:
     ^
lucasklaassen commented 7 years ago

I believe plugins and custom should be matched up with the same indentation.

paolini commented 7 years ago

With the same indentation I get this error:

Serverless plugin "serverless-client-s3" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file.

The package has been installed as described in the documentation.

added I suspect this is a problem of interaction between yarn (which I was using) and npm.

lucasklaassen commented 7 years ago

Can you include your package.json file here?

paolini commented 7 years ago

my package.json

{
  "name": "notes",
  "version": "0.0.1",
  "description": "notes",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "emanuele.paolini@gmail.com",
  "license": "ISC",
  "devDependencies": {
    "express": "^4.15.4"
  },
  "dependencies": {
    "aws-sdk": "^2.108.0",
    "serverless": "^1.21.0",
    "serverless-client-s3": "^2.0.0"
  }
}
paolini commented 7 years ago

Ok, this is actually issue #53. So the problem with the yml file should be solved by removing a space before custom: in README.md