Skip to content

[Error: UNKNOWN: unknown error, open '...\vite-latest\dist\example.jpg'] #18

@jhbynf

Description

@jhbynf

I am getting an error on build time, using the latest version of vite without any additional libraries. I have a example.jpg stored in the public folder of my vite project.

`> vite-latest@0.0.0 build

vite build

vite v5.4.11 building for production...
✓ 4 modules transformed.
dist/index.html 0.50 kB │ gzip: 0.32 kB
dist/assets/index-DRNMkqs8.css 1.21 kB │ gzip: 0.62 kB
dist/assets/index-Hg5hV26S.js 0.71 kB │ gzip: 0.40 kB
✓ built in 156ms
[Error: UNKNOWN: unknown error, open 'C:\Users...\Documents\git\vite-latest\dist\example.jpg'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'open',
path: 'C:\Users\...\Documents\git\vite-latest\dist\example.jpg'
}`

I have tried storing images in src/assets instead of public but that did not help either. Am i missing something?

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