-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I try to make eachRecord
adt.open('./dev-scripts/adtImport/adtFiles/TypeSP.ADT', 'windows-1251', function(err, table) {
const tableColumns = table.columns;
table.eachRecord(function(err, record) {
if(err){
console.log(`err: ${JSON.stringify(err, null, 2)}`);
}
tableColumns.forEach(col => {
console.log(col.name);
console.log(record);
});
console.log(`next row`);
});
table.close(); // Optional
});
First row logged successfuly.
But before start reading next row i have error:
internal/validators.js:113
throw err;
^
TypeError [ERR_INVALID_ARG_TYPE]: The "fd" argument must be of type number. Received type object
at Object.read (fs.js:456:3)
at readNextRecord (\node_modules\node_adt\node_adt.js:150:10)
at \node_modules\node_adt\node_adt.js:177:11
at FSReqCallback.wrapper [as oncomplete] (fs.js:481:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @0.1.0 adt: `node dev-scripts/adtImport/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels