60late / vite-plugin-minipic

Based on sharp.js, compress your image before vite generate bundle. It's easy and fast! 基于sharp.js的vite图片压缩插件,又快又好用!
31 stars 4 forks source link

run buid 报错Error: ENOENT: no such file or directory #10

Closed yunyingchen closed 2 months ago

yunyingchen commented 3 months ago

image

60late commented 3 months ago

尝试再次运行后试试是否不再报错 如果再次运行后不再报错说明这应该是一个bug

yunyingchen commented 3 months ago

试了很多次了,都报同一个错

---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年05月17日 15:18 | | 收件人 | 60late/vite-plugin-minipic @.> | | 抄送人 | yunyingchen @.>, Author @.> | | 主题 | Re: [60late/vite-plugin-minipic] run buid 报错Error: ENOENT: no such file or directory (Issue #10) |

尝试再次运行后试试是否不再报错 如果再次运行后不再报错说明这应该是一个bug

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

qyh214 commented 3 months ago

我也遇到了类似问题,是不是因为我的项目是electron-vite,其存放png的位置和普通vite项目不同导致的?

60late commented 3 months ago

这看起来像是一个bug,应该是由于目录无权限或者是资源目录与普通VITE目录不同造成的。 这个问题将在下个版本得到修复

itmanyong commented 2 months ago

期待这个问题修复+1

chinahnjlk commented 2 months ago

期待这个issues 尽快修复

60late commented 2 months ago

@qyh214 @yunyingchen @chinahnjlk @itmanyong 发布了v1.1.3版本,请升级到最新版后进行尝试。 看起来是非标准项目存放资源文件夹不同导致的,在diskcache写入文件时没有进行路径保护。 目前加了相关逻辑,可以试一下能否正常使用。

qyh214 commented 2 months ago

确认没有问题了,可正常压缩,另外压缩比很强啊 QQ截图20240706231501 作为对比,本包没有修复前,用的临时替代 QQ截图20240706231521

60late commented 2 months ago

确认没有问题了,可正常压缩,另外压缩比很强啊 QQ截图20240706231501 作为对比,本包没有修复前,用的临时替代 QQ截图20240706231521

感谢反馈,此issue先关闭了。