You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ node test.js raw/0* 1 ↵
[ { a: 'e', b: 'f' } ]
/Users/js/code/private/csv2report/node_modules/convert-csv-to-json/index.js:42
csvToJson.indexHeader(index);
^
TypeError: csvToJson.indexHeader is not a function
at exports.indexHeader (/Users/js/code/private/csv2report/node_modules/convert-csv-to-json/index.js:42:13)
at file:///Users/js/code/private/csv2report/test.js:6:4
at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
at async loadESM (node:internal/process/esm_loader:40:7)
at async handleMainPromise (node:internal/modules/run_main:66:12)
So happy to see this issue has already been reported. I am facing the same issue.
Luckily indexHeader is not private. My workaround is assign the number directly and ignore the function. Small draw bask is you cannot chain it, and have to assign it before calling getJsonFromCsv() etc.
Expected Behavior
Should not throw error.
Actual Behavior
Steps to Reproduce the Problem
Specifications
PS
Seems the issue arise from csvToJson.js:
Ln27:
indexHeader(indexHeader)
...Ln31:
this.indexHeader = indexHeader;
The text was updated successfully, but these errors were encountered: