Skip to content

Dependencies are not packaged by electron-builder when using pnpm #6289

Closed
@Ripwords

Description

@Ripwords
  • Electron-Builder Version: 22.11.7
  • Node Version: 16.9.1
  • Electron Version: 15.0.0
  • Electron Type (current, beta, nightly): current
  • Target: windows/nsis

I'm having issues trying to use pnpm and electron-builder. I tried multiple times to package the app using basic commands and build configurations from online guides but i would always get dependency related errors after packaging it.

Initially i thought it was my configuration error, but after copying the whole project and used npm instead, everything worked as expected.

From what i could find, it seems that electron-builder can't resolve the dependencies within the .pnpm folder, but i am not 100% certain of this.

pnpm and electron-builder are both great would love to have this fixed

Build config

image

Using pnpm

As shown in the screenshot, semver already exist in node_modules/.pnpm
image

Using npm with same exact build config

Application is built with no errors by electron-builder
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions