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.