/Users/franzip/Work/project-api/node_modules/hapi/node_modules/hoek/lib/index.js:732
throw new Error(msgs.join(' ') || 'Unknown error');
^
Error: Invalid register options {
"data" [1]: {
"dir": "/Users/franzip/Work/project-api/lib",
"pattern": "fixtures.js"
},
"models" [2]: "/Users/franzip/Work/project-api/lib/models",
"adapters" [3]: {
"sails-mongo": {
"pkFormat": "string",
"syncable": true,
"defaults": {
"host": "localhost",
"database": "sails",
"port": 27017,
"user": null,
"password": null,
"schema": false,
"url": null,
"w": 1,
"wtimeout": 0,
"fsync": false,
"journal": false,
"readPreference": null,
"nativeParser": false,
"forceServerObjectId": false,
"recordQueryStats": false,
"retryMiliSeconds": 5000,
"numberOfRetries": 5,
"ssl": false,
"poolSize": 5,
"socketOptions": {
"noDelay": true,
"keepAlive": 0,
"connectTimeoutMS": 0,
"socketTimeoutMS": 0
},
"auto_reconnect": true,
"disableDriverBSONSizeCheck": false,
"reconnectInterval": 200,
"wlNext": {
"caseSensitive": false
}
},
"mongo": {},
"identity": "sails-mongo"
}
},
"connections" [4]: {
"mydb": {
"adapter": "sails-mongo",
"host": "localhost",
"port": 27017,
"database": "mydb"
}
}
}
[1] "connections" is not allowed
[2] "adapters" is not allowed
[3] "models" is not allowed
[4] "data" is not allowed
at Object.exports.contain.exports.reachTemplate.exports.assert.condition [as assert] (/Users/franzip/Work/project-api/node_modules/hapi/node_modules/hoek/lib/index.js:732:11)
at Object.exports.apply (/Users/franzip/Work/project-api/node_modules/hapi/lib/schema.js:17:10)
at module.exports.internals.Plugin.internals.Plugin.register.each [as register] (/Users/franzip/Work/project-api/node_modules/hapi/lib/plugin.js:180:22)
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:119:24
at iterate (/Users/franzip/Work/project-apinode_modules/glue/node_modules/items/lib/index.js:36:13)
at Object.exports.serial (/Users/franzip/Work/project-api/node_modules/glue/node_modules/items/lib/index.js:39:9)
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:117:19
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:129:9
at iterate (/Users/franzip/Work/project-api/node_modules/glue/node_modules/items/lib/index.js:36:13)
at done (/Users/franzip/Work/project-api/node_modules/glue/node_modules/items/lib/index.js:28:25)
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:101:13
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:129:9
at iterate (/Users/franzip/Work/project-api/node_modules/glue/node_modules/items/lib/index.js:36:13)
at done (/Users/franzip/Work/project-api/node_modules/glue/node_modules/items/lib/index.js:28:25)
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:92:9
at /Users/franzip/Work/project-api/node_modules/glue/lib/index.js:129:9
"dependencies": {
"bassmaster": "1.9.x",
"bedwetter": "1.8.x",
"boom": "3.1.x",
"dogwater": "1.1.x",
"glue": "3.1.x",
"hapi": "12.x.x",
"hapi-swagger": "3.3.x",
"hoek": "3.x.x",
"inert": "3.2.x",
"joi": "7.2.x",
"poop": "2.x.x",
"vision": "4.x.x",
"sails-mongo": "0.12.x"
}
var config = require('./config');
...
manifest: {
server: {
...
},
connections: {
...
},
registrations: {
{
plugin: 'dogwater',
options: config.dogwater
},
{
plugin: 'poop',
options: config.poop
}
}
}
module.exports = {
...
dogwater: {
connections: {
mydb: {
adapter: 'sails-mongo',
host: 'localhost',
port: 27017,
database: 'mydb'
}
},
adapters: {
'sails-mongo': require('sails-mongo')
},
models: path.normalize(__dirname + '/lib/models'),
data: {
dir: path.normalize(__dirname + '/lib'),
pattern: 'fixtures.js'
}
},
poop: {
logPath: path.join(__dirname, 'poop.log')
}
};
The problem seems to be the object passed as option... passing an empty object makes poop registration works but not dogwater.
As stated in the docs, I'm passing the plugin name as a string and an object for the options... what am I doing wrong?