Skip to content

build don't work when using pnpm monrepos #856

@a-eid

Description

@a-eid

Describe the bug

we're using a pnpm monorepo and everything works in development fine..

but after building the app we get errors like Can't find module 'X'

I tried applying this fix

If you are using the pnpm package manager, you’ll need to add a file .npmrc with shamefully-hoist=true in project root directory (in order for your dependencies to be bundled correctly). Also, you need to delete node_modules and pnpm-lock.yaml, then reinstall the modules. Of course you can switch to other package manager (e.g. npm, yarn) to avoid this problem.

from the docs with no luck.

Electron-Vite Version

^4.0.1

Electron Version

38.5.0

Vite Version

^7.1.12

Validations

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