graphite-project / docker-graphite-statsd

Official Docker image for Graphite
MIT License
477 stars 174 forks source link

[Q] util.js:146 TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor" argument must be of type Function. Received type undefined #170

Closed xtender closed 3 years ago

xtender commented 3 years ago

Looks like the docker container works fine and we can see new metrics in browser fine (except the only app that gets data from it), but we constantly get this error in the log:

   at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/opt/statsd/stats.js:4:14)
    at Module._compile (internal/modules/cjs/loader.js:955:30) {
  code: 'ERR_INVALID_ARG_TYPE'
}
util.js:146
    throw new ERR_INVALID_ARG_TYPE('superCtor', 'Function', superCtor);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor" argument must be of type Function. Received type undefined
    at Object.inherits (util.js:146:11)
    at Object.<anonymous> (/opt/statsd/lib/config.js:33:6)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/opt/statsd/stats.js:4:14)
    at Module._compile (internal/modules/cjs/loader.js:955:30) {
  code: 'ERR_INVALID_ARG_TYPE'
}
util.js:146
    throw new ERR_INVALID_ARG_TYPE('superCtor', 'Function', superCtor);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor" argument must be of type Function. Received type undefined
    at Object.inherits (util.js:146:11)
    at Object.<anonymous> (/opt/statsd/lib/config.js:33:6)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/opt/statsd/stats.js:4:14)
    at Module._compile (internal/modules/cjs/loader.js:955:30) {
  code: 'ERR_INVALID_ARG_TYPE'
}

What does this mean? How we can troubleshoot it?

deniszh commented 3 years ago

Hi @xtender ,

Which version of container do you running? I see sim ilar error or in quite old statsd < 0.8.2 on on some other JS provect running on Node v6. Current image running statsd 0.9.0 and nodejs > 12. If you no using statsd you can disable it using STATSD_DISABLED=1 env variable.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.