Skip to content

Missing assets files during build #4144

@Felzow47

Description

@Felzow47

When building pear-desktop with pnpm dist:win, the build fails with the following errors:

Error: ENOENT: no such file or directory, open 'C:\...\pear-desktop\assets\tray.png'
Error: ENOENT: no such file or directory, open 'C:\...\pear-desktop\assets\tray-paused.png'
Error: ENOENT: no such file or directory, open 'C:\...\pear-desktop\assets\icon.png'
  • Repository: pear-desktop (fork or clone)
  • Command: pnpm dist:win
  • OS: Windows
  • Node.js: v22.14.0
  • pnpm: v11.1.0

The following files are referenced in the code but missing from the assets/ folder:

  1. assets/tray.png - Referenced in src/tray.ts:

    import defaultTrayIconAsset from '@assets/tray.png?asset&asarUnpack';
  2. assets/tray-paused.png - Referenced in src/tray.ts:

    import pausedTrayIconAsset from '@assets/tray-paused.png?asset&asarUnpack';
  3. assets/icon.png - Referenced in:

    • src/index.ts (line 168)
    • src/plugins/touchbar/index.ts
    • src/plugins/notifications/utils.ts
  • The assets/ folder exists
  • Files assets/media-icons-black/*.png are present
  • Files assets/error.html and assets/mdui.css are present
  • Files tray.png, tray-paused.png and icon.png are missing
> pear-music@3.11.0 build C:\Users\...\pear-desktop
> pnpm electron-vite build

rolldown-vite v7.1.8 building SSR bundle for production...
✓ 2525 modules transformed.

✗ Build failed in 1.56s

error during build:

Build failed with 3 errors:

[plugin vite:node-asset]
Error: ENOENT: no such file or directory, open 'C:\...\pear-desktop\assets\tray.png'

[plugin vite:node-asset]
Error: ENOENT: no such file or directory, open 'C:\...\pear-desktop\assets\tray-paused.png'

[plugin vite:node-asset]
Error: ENOENT: no such file or directory, open 'C:\...\pear-desktop\assets\icon.png'

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