Open vivianep opened 4 years ago
I am having a similar issue when trying to use pool.query inside of eachLine
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
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?