abstractvector / node-dbf

An efficient dBase DBF file parser written in pure JavaScript
MIT License
54 stars 67 forks source link

converting to csv always throw -> Error: ENOENT: no such file or directory, open ... #28

Open alexrah opened 6 years ago

alexrah commented 6 years ago

I honestly dont understand why the file path passed to cli as $ node-dbf convert file.dbf

get joined to node-dbf folder inside node_modules.

I ended up replacing this line: https://github.com/abstractvector/node-dbf/blob/12fb719e1dbe5f49d8509250e2c30953310cbdf4/bin/node-dbf-convert.js#L16

with: .action(function(f) { file = f; })

this solved the issue and allowed me to convert to csv, but feels like I'm missing something.