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

Promises example #43

Open
vivianep opened this issue Jul 12, 2020 · 2 comments
Open

Promises example #43

vivianep opened this issue Jul 12, 2020 · 2 comments

Comments

@vivianep
Copy link

Hello, it seems that the example using promises is not working as expected. Using the code presented on the README file, the promise is never resolved. The problem looks to happen because four parameters are passed to lineReader.eachLine function.

If a pass only the following params:

lineReader.eachLine(filename, options, function(err){ ...})
the promise is resolved. Can you please check the code on the readme file?

@prophetsfall
Copy link

I am having a similar issue when trying to use pool.query inside of eachLine

@Davetherave2010
Copy link

I couldn't make promises work either.

I found that you can use node's readline functionality instead. Wrote it up here - https://daendersby.medium.com/stop-using-line-reader-1ad452f68155

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

3 participants