{"id":27679,"library":"dbf-parser","title":"dbf-parser","description":"An event-based, pure JavaScript parser for reading data from dBase (.dbf) files. Based on node-dbf but adds float type support, correct handling of numeric fields, and works without CoffeeScript. Version 0.0.1 is stable but minimal: only Character and Numeric field types are supported. Primarily for Node.js, uses EventEmitter for streaming output. Not actively maintained; alternative libraries like dbf or shapefile-js may offer more complete implementations.","status":"maintenance","version":"0.0.1","language":"javascript","source_language":"en","source_url":"git://github.com/tamtakoe/node-dbf","tags":["javascript","dBase","dbf"],"install":[{"cmd":"npm install dbf-parser","lang":"bash","label":"npm"},{"cmd":"yarn add dbf-parser","lang":"bash","label":"yarn"},{"cmd":"pnpm add dbf-parser","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is CJS-only; no ESM exports.","wrong":"import Parser from 'dbf-parser';","symbol":"Parser","correct":"const Parser = require('dbf-parser');"}],"quickstart":{"code":"const Parser = require('dbf-parser');\nconst parser = new Parser('/path/to/file.dbf');\n\nparser.on('start', () => console.log('Parsing started'));\nparser.on('header', (header) => console.log(header));\nparser.on('record', (record) => console.log(record));\nparser.on('end', () => console.log('Parsing complete'));\n\nparser.parse();","lang":"javascript","description":"Shows how to create a parser, register event handlers, and start parsing a .dbf file."},"warnings":[{"fix":"Pre-process .dbf file to ensure only supported types, or use a more full-featured library like dbf.","message":"Only Character and Numeric field types are supported; other types (e.g., Date, Logical) may cause parse errors or undefined behavior.","severity":"gotcha","affected_versions":"0.0.1"},{"fix":"Consider alternatives like shapefile-js or dbf for ongoing support and features.","message":"The module is not actively maintained; last updated years ago. Known issues with large files and unsupported field types.","severity":"gotcha","affected_versions":"0.0.1"},{"fix":"For large files, use a streaming parser like dbf (npm package) or chunk the file manually.","message":"Uses synchronous fs.readFile internally, so large .dbf files may block the event loop. Documentation mentions intended switch to fs.readStream but not implemented.","severity":"gotcha","affected_versions":"0.0.1"},{"fix":"If field padding is significant, use a different parser that preserves raw content.","message":"Record field values are trimmed of padding characters, which may remove legitimate leading/trailing spaces.","severity":"gotcha","affected_versions":"0.0.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Remove or convert Date fields to Character or Numeric before processing.","cause":"Date field type (type code 'D') is not supported.","error":"Error: Unsupported field type: D"},{"fix":"Ensure you use 'const parser = new Parser(path);' after requiring the module.","cause":"Forgot to call new Parser() and use require correctly.","error":"TypeError: parser.on is not a function"},{"fix":"Run 'npm install dbf-parser' in your project directory.","cause":"Module not installed or path is incorrect.","error":"Cannot find module 'dbf-parser'"},{"fix":"Use a streaming parser like 'dbf' (npm package) for files over 1GB.","cause":"Large file being read entirely into memory via fs.readFile.","error":"RangeError: File size exceeds maximum buffer"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}