pdf-parse-v2-bun-fix
CommunityFix pdf-parse v2 'not a function' errors in Bun apps
System Documentation
What problem does it solve?
This Skill resolves the TypeError: require("pdf-parse") is not a function error that breaks PDF attachment upload functionality in Bun and Elysia backend projects after upgrading the pdf-parse dependency to version 2.x, which introduced breaking class-based API changes from the previous v1 callable function syntax.
Core Features & Use Cases
- Precise Error Diagnosis: Includes clear recognition patterns to confirm the error is caused by pdf-parse v2's breaking API changes, eliminating guesswork.
- Drop-In Code Fix: Provides tested, production-ready replacement code for the broken parsePdf function that is compatible with Bun runtimes.
- Use Case: Perfect for backend developers maintaining Bun/Elysia services (such as WhatsApp chatbots) with PDF upload features that stopped working after a pdf-parse dependency upgrade.
Quick Start
Use this skill to update the broken parsePdf function in your Bun backend's chat route with the correct pdf-parse v2 class-based API implementation to resolve the 'not a function' error and restore PDF upload functionality.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: pdf-parse-v2-bun-fix Download link: https://github.com/freedomw1987/tree_monstor/archive/main.zip#pdf-parse-v2-bun-fix Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.