Skip to content

Request: Update icon-gen to support [email protected] (libvips conflicts with modern sharp versions) #170

@taohel

Description

@taohel

Hello maintainers,

First of all, thank you for providing icon-gen, which is still one of the simplest tools to generate .ico and .icns assets for Electron apps.

However, the project currently depends on an outdated version of sharp, which causes serious compatibility issues when used in modern Node.js environments.

🚨 The Problem

When a project installs both:

[email protected]+ (modern, using the new @img/sharp-* distributions)

icon-gen (bundled with its own older sharp version)

Node loads two different versions of libvips, resulting in warnings and unpredictable behavior such as:

modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib and
node_modules/icon-gen/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib
One of the two will be used. Which one is undefined.

This is a direct result of mixing sharp versions with incompatible libvips binaries.

💡 Why this matters

Many modern Node.js / Electron projects already use [email protected]+ or [email protected]+ for image processing.
Having icon-gen bundle an older version of sharp makes both tools conflict and causes:

libvips loader warnings

unpredictable results

crashes in some environments

difficulty using icon-gen inside Electron build pipelines

🙏 Feature Request

Please update icon-gen to use (or allow using) [email protected]
or at least the currently maintained series.

Recommended improvements:

Update sharp to the newest version (0.34.x).

Or make sharp a peer dependency, so icon-gen uses the project's installed version.

Or remove sharp as a bundled nested dependency to avoid libvips duplication.

This update would resolve libvips conflicts and allow icon-gen to be used safely alongside modern toolchains.

✔ Environment Example

Node.js 20+

macOS ARM64

[email protected]

icon-gen installed from latest npm version

🙌 Thank you!

I believe updating sharp support would significantly improve icon-gen’s compatibility and make it usable again in modern Electron development.

Please let me know if you need help testing or validating a PR — I’m happy to contribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions