Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: clamscan.passthrough is not a function #46

Closed
midnightcodr opened this issue May 12, 2020 · 3 comments
Closed

TypeError: clamscan.passthrough is not a function #46

midnightcodr opened this issue May 12, 2020 · 3 comments

Comments

@midnightcodr
Copy link

I am trying out the passthrough() example but unfortunately I am getting this

TypeError: clamscan.passthrough is not a function

I am initializing the connection options as

const clamscan = new NodeClam().init({
    clamdscan: {
        host: '127.0.0.1',
        port: 3310,
    }
});

as I am running the clamav service in a docker container (telnet 127.0.0.1 3310 works btw).

Ideas?

@midnightcodr
Copy link
Author

Never mind. I found the cause of the error - I didn't use .then() or await on the clamscan instance. To fix the problem is as simple as

const clamscan = new NodeClam()
await clamscan.init({
    clamdscan: {
        host: '127.0.0.1',
        port: 3310,
    }
});

@kylefarris
Copy link
Owner

Great! Glad you figured it out. :-) I'm sorry I never saw this issue come through--I would have been happy to point that out.

@midnightcodr
Copy link
Author

No problem. I am so happy to find your library that provides the Stream/Transform ability that I need in my application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants