Open wmfairuz opened 11 years ago
Same here!
Got it! Change "default": "", to "default": {}, in config/schema.json.
you can also add an empty pluginConfigs into config.json:
{
"host": "irc.hostname.de",
"port": 6667,
"nick": "BOTName",
"username": "botnamejs",
"realname": "Bot Name",
"channels": ["#channel"],
"command": ".",
"logLevel": "info",
"pluginConfigs": {
},
"plugins": ["global", "reload", "lastseen", "textfilter"]
}
Yeah but that is a dirty way to "fix" things. The default: in the schema makes it that you don't have to specify empty properties! ;)
that is true. but I feel the schema.json belongs to the developer while my config files belong to me. so I fix things in "my" files first hoping for an updated version that allows me to delete the unnecessary config :-)
Oh, sure that is a valid workaround in the meantime! Since this is an issue thread in the project itself, I thought it might be relevant to point out the originating problem. I could submit a PR to fix it, but this project doesn't really seem maintained anymore... :/
I got this error when trying to run bot.js.
fairuz@fairuz-vb:~/NodeJS-IRC-Bot$ node bot.js
/home/fairuz/NodeJS-IRC-Bot/node_modules/pkgconfig/node_modules/jsvutil/lib/jsv.js:39 throw error('Schema validation failed.', report.errors); ^ ValidationError: Schema validation failed. Instance is not a required type (object): pluginConfigs at error (/home/fairuz/NodeJS-IRC-Bot/node_modules/pkgconfig/node_modules/jsvutil/lib/jsv.js:72:15) at Object.validate (/home/fairuz/NodeJS-IRC-Bot/node_modules/pkgconfig/node_modules/jsvutil/lib/jsv.js:39:15) at Object.validate (/home/fairuz/NodeJS-IRC-Bot/node_modules/pkgconfig/node_modules/jsvutil/index.js:54:9) at pkgconfig (/home/fairuz/NodeJS-IRC-Bot/node_modules/pkgconfig/pkgconfig.js:129:20) at Object. (/home/fairuz/NodeJS-IRC-Bot/bot.js:27:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Any idea?
INFO: fairuz@fairuz-vb:~/NodeJS-IRC-Bot$ node --version v0.10.0 fairuz@fairuz-vb:~/NodeJS-IRC-Bot$ npm --version 1.2.14