我试图在OSX上使用edgee:slingshot上传到亚马逊s3。看来我需要创建一个settings.json文件并将其放在root中,我这样做了。但是,我得到settings.json:解析错误读取设置文件。我究竟做错了什么? (我没有复制/粘贴)。非常感谢任何帮助。
settings.json
{
"key": "myAWSAccessKeyId",
"secret": "myAWSSecretKey",
"bucket": "mybucketname",
"acl": "public-read",
}
现在得到:
W20170127-23:46:55.176(-8)? (STDERR) Error: Match error: Unknown key in field secret
W20170127-23:46:55.176(-8)? (STDERR) at exports.check (packages/check.js:57:15)
W20170127-23:46:55.176(-8)? (STDERR) at new Slingshot.Directive (packages/edgee_slingshot.js:325:3)
W20170127-23:46:55.177(-8)? (STDERR) at Object.Slingshot.createDirective (packages/edgee_slingshot.js:295:5)
W20170127-23:46:55.177(-8)? (STDERR) at app/server/main.js:1:-17
W20170127-23:46:55.177(-8)? (STDERR) at app/server/main.js:24:4
W20170127-23:46:55.178(-8)? (STDERR) at /Users/lgulli/revume/.meteor/local/build/programs/server/boot.js:295:34
W20170127-23:46:55.178(-8)? (STDERR) at Array.forEach (native)
W20170127-23:46:55.179(-8)? (STDERR) at Function._.each._.forEach (/Users/lgulli/.meteor/packages/meteor-tool/.1.4.2_3.1c557gy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170127-23:46:55.191(-8)? (STDERR) at /Users/lgulli/revume/.meteor/local/build/programs/server/boot.js:128:5
W20170127-23:46:55.192(-8)? (STDERR) at /Users/lgulli/revume/.meteor/local/build/programs/server/boot.js:344:5
答案 0 :(得分:0)
在JSON中,与JavaScript不同,对象中的最后一个属性以逗号结尾是非法的。
尝试:
{
"key": "myAWSAccessKeyId",
"secret": "myAWSSecretKey",
"bucket": "mybucketname",
"acl": "public-read"
}