这是我的 config.json 代码:
{
"connections": [
{
"port": 3000
}
],
"registrations": [
{
"plugin": "./plugins/db"
},
{
"plugin": "good",
"options": {
"reporters": {
"console": [
{
"module": "good-squeeze",
"name": "Squeeze",
"args": [
{
"log": "*",
"response": "*"
}
]
},
{
"module": "good-console"
},
"stdout"
]
}
}
},
{
"plugin": "./routes/bookmarks"
},
{
"plugin": "blipp"
}
]
}
和 server.js:
'use strict';
const Hapi = require('hapi');
const Glue = require('glue');
const manifest = require('./config.json');
const options = {
relativeTo: __dirname
}
Glue.compose(manifest, options, (err, server) => {
if (err) {
throw err
}
server.start((err) => {
if (err) {
throw err
}
console.log(`Server is running at ${server.info.uri}`)
});
})
我得到的错误:
/home/master/Documents/Hapi/starter/node_modules/hoek/lib/index.js:736 throw new Error(msgs.join(' ') || '未知错误'); ^
错误:无效的注册选项{“reporters”[1]:{“console”:[{“module”:“good-squeeze”,“name”:“Squeeze”,“args”:[{“log”:“* ",
有什么解决办法吗?