kylefarris / clamscan

A robust ClamAV virus scanning library supporting scanning files, directories, and streams with local sockets, local/remote TCP, and local clamscan/clamdscan binaries (with failover).
MIT License
236 stars 69 forks source link

Configuration is broken when no local clamav binary available #30

Closed vasyas closed 5 years ago

vasyas commented 5 years ago

Initializing

    clamScan = await new NodeClam().init({
        debug_mode: true,
        clamdscan: {
            host: config.clamav.host,
            port: config.clamav.port,
            socket: null,
        },
    })

Further access fails with

(node:2119) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'path' of undefined
    at local_fallback (/Users/vasyas/projects/elpaso/server/node_modules/clamscan/index.js:625:61)
    at Promise (/Users/vasyas/projects/elpaso/server/node_modules/clamscan/index.js:674:24)
    at Promise._execute (/Users/vasyas/projects/elpaso/server/node_modules/bluebird/js/release/debuggability.js:313:9)
asabhaney commented 5 years ago

I am encountering this issue as well, though the docs seems to suggest this should work as of 1.0