Static GitHub Issues

[2550] This dependency was not found: ... To install it, you can run: npm install --save dgram

prev: Cannot read property 'call' of undefined
next: Vue warning underscore included directory name

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

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2218">#c2218</a>)</em></sub></div>