Of course i know some issues with similar errors, but they don't help me.
plugins/graylog.js
const graylog2 = require('graylog2')
const logger = new graylog2.graylog({
servers: [
{ 'host': '...............', port: 12201 }
],
hostname: 'server.name', // the name of this host
// (optional, default: os.hostname())
facility: 'Node.js', // the facility for these log messages
// (optional, default: "Node.js")
bufferSize: 1350 // max UDP packet size, should never exceed the
// MTU of your system (optional, default: 1400)
})
logger.on('error', function (error) {
console.error('Error while trying to write to graylog2:', error)
})
nuxt.config.js
plugins: [
'~/plugins/graylog.js'
],
After npm run dev
i have the error below:
This dependency was not found:
* dgram in ./node_modules/graylog2/graylog.js
To install it, you can run: npm install --save dgram
But if i do node plugins/graylog.js
it will works. There is dgram
library In my package.json. Also i tried other libraries, but the error was the same...
Help me, please