lineReader.eachLine(...).then is not a function
See original GitHub issueWhen i try to use this code sample…
var lineReader = require('line-reader');
// read all lines:
lineReader.eachLine('file.txt', function(line) {
console.log(line);
}).then(function (err) {
if (err) throw err;
console.log("I'm done!!");
});
… i get this error:
}).then(function (err) { ^ TypeError: lineReader.eachLine(…).then is not a function
Do you have any idea why?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
Nodejs - read line by line from file, perform async action for ...
Line by Line module helps you reading large text files, line by line, without buffering the files into memory.
Read more >How to use lineReader.eachLine() in client side javascript ...
Line-Reader is a node.js library which read a file line-by-line , in a way in which the .txt file is arranged. ... then...
Read more >Why You Should Stop using Line-Reader | by David Endersby
My getDynamicKeys function is set up to build and return an array, ... We pipe our file into the read stream and then...
Read more >Readline | Node.js v19.3.0 Documentation
Once this code is invoked, the Node.js application will not terminate until ... then invokes the callback function passing the provided input as...
Read more >function line-reader.eachLine (filename, options, iteratee, cb)
module line-reader ... function eachLine(filename, options, iteratee, cb) { if (options ... The `eachLine` function reads each line of the given file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Same here… Will try to find a workaround. EDIT: solved it this way:
how can use pause and resume function in the Module? thx~