Skip to content

Cannot resolve "iconv-lite" from ".../node_modules/restructure/src/DecodeStream.js" and externals are not allowed! #1569

@MickL

Description

@MickL

Bug Report

When building in a Vite project (uses Rollup) it throws the error:

[12:45:41 AM] ERROR Cannot resolve "iconv-lite" from ".../node_modules/restructure/src/DecodeStream.js" and externals are not allowed!

When I see correctly then fontkit was using iconv-lite but it has been removed in 2.0 but 2.0 hasnt yet been added to fontkit, PR #1367

Your environment

  • pdfkit version: 0.15.1
  • Node version: 22.11.0
  • Operating System: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions