Witam, jestem niestety zielony w tych sprawach, a potrzebuje modułu log4js do pewnego skryptu. Po zainstalowaniu modułu i odpaleniu skryptu wyskakuje taki błąd :/ Pomoże mi ktoś?
root@vz55575553:/var/www/html/Bot/BOT# node site
/var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:43
throw new Error(`Problem with log4js configuration: (${util.inspect(this .candidate, { depth: 5 })})` +
^
Error: Problem with log4js configuration: ({ appenders:
[ { type: 'console' },
{ type: 'file', filename: 'logs/site.log' } ] }) - must have a property "ap penders" of type object.
at tests.forEach (/var/www/html/Bot/BOT/node_modules/log4js/lib/configuratio n.js:43:15)
at Array.forEach (native)
at Configuration.throwExceptionIf (/var/www/html/Bot/BOT/node_modules/log4js /lib/configuration.js:41:11)
at new Configuration (/var/www/html/Bot/BOT/node_modules/log4js/lib/configur ation.js:203:10)
at Object.configure (/var/www/html/Bot/BOT/node_modules/log4js/lib/log4js.js :205:12)
at Object.<anonymous> (/var/www/html/Bot/BOT/site.js:10:8)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
Jeżeli próbuje odpalić poprzez komendę nodejs to wyskakuje mniej błędów:
root@vz55575553:/var/www/html/Bot/BOT# nodejs site
/var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:43
throw new Error(`Problem with log4js configuration: (${util.inspect(this.candidate, { depth: 5 })})` +
^
Error: Problem with log4js configuration: ({ appenders:
[ { type: 'console' },
{ type: 'file', filename: 'logs/site.log' } ] }) - must have a property "appenders" of type object.
at /var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:43:15
at Array.forEach (native)
at Configuration.throwExceptionIf (/var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:41:11)
at new Configuration (/var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:203:10)
at Object.configure (/var/www/html/Bot/BOT/node_modules/log4js/lib/log4js.js:205:12)
at Object.<anonymous> (/var/www/html/Bot/BOT/site.js:10:8)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)