Skip to content

Can't resolve 'spawn-sync' #216

@adamhalasz

Description

@adamhalasz

Describe the bug
When I import fromBuffer from pdf2pic and launch my app it shows this error:

Module not found: Can't resolve 'spawn-sync' in '/Users/adam/github/my_app/app/node_modules/.pnpm/[email protected]/node_modules/cross-spawn'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/cross-spawn/index.js
./node_modules/.pnpm/[email protected]/node_modules/gm/lib/compare.js
./node_modules/.pnpm/[email protected]/node_modules/gm/index.js
./node_modules/.pnpm/[email protected]/node_modules/pdf2pic/dist/index.js
./src/app/lib/utils/pdftopic.ts

To Reproduce
Steps to reproduce the behavior:

import { fromBuffer } from "pdf2pic";

Expected behavior
It should not show an error.

Environment;

  • OS: macOS Ventura 13.1 (Apple M1 Pro)
  • pdf2pic version ^3.1.3
  • graphicsmagick/imagemagick version: 1.3.45 2024-08-27
  • ghostscript version: 10.04.0
  • Node.js: v22.5.1
  • Next.js: 14.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions