juzisang / picgo-plugin-compress

Image compression plugin for PicGo
MIT License
129 stars 31 forks source link

tinypng上傳失敗 #54

Open NeiL978 opened 2 years ago

NeiL978 commented 2 years ago

PicGo-Core版本:picgo@1.5.0-alpha.10 使用tinyPNG壓縮,上傳到tinyPNG時報錯。


2022-09-26 20:12:04 [PicGo INFO] Before transform 
2022-09-26 20:12:04 [PicGo INFO] Transforming... Current transformer is [compress] 
2022-09-26 20:12:04 [PicGo INFO] 压缩:tinypng 
2022-09-26 20:12:04 [PicGo INFO] 图片地址:/Applications/Typora.app/Contents/Resources/TypeMark/assets/icon/icon_512x512.png 
2022-09-26 20:12:04 [PicGo INFO] 图片信息:{"fileName":"icon_512x512.png","extname":".png"} 
2022-09-26 20:12:04 [PicGo INFO] 图片地址:/Applications/Typora.app/Contents/Resources/TypeMark/assets/icon/icon_256x256.png 
2022-09-26 20:12:04 [PicGo INFO] 图片信息:{"fileName":"icon_256x256.png","extname":".png"} 
2022-09-26 20:12:04 [PicGo INFO] TinyPng初始化 
2022-09-26 20:12:04 [PicGo INFO] TinyPng开始上传 
2022-09-26 20:12:04 [PicGo INFO] TinyPng初始化 
2022-09-26 20:12:04 [PicGo INFO] TinyPng开始上传 
2022-09-26 20:12:04 [PicGo INFO] 获取本地图片 
2022-09-26 20:12:04 [PicGo INFO] 获取本地图片 
2022-09-26 20:12:04 [PicGo INFO] 使用TinypngKey:XXXXXXXXXXXHX0FjGc4cCXr68Fz 
2022-09-26 20:12:04 [PicGo INFO] TinyPng 上传本地图片 
2022-09-26 20:12:04 [PicGo WARN] failed 
2022-09-26 20:12:04 [PicGo ERROR] 
------Error Stack Begin------
TypeError: req.end is not a function
    at TinyPng.uploadImage (/Users/neil/.picgo/node_modules/picgo-plugin-compress/dist/compress/tinypng/tinypng.js:160:17)
    at TinyPng.<anonymous> (/Users/neil/.picgo/node_modules/picgo-plugin-compress/dist/compress/tinypng/tinypng.js:107:54)
    at step (/Users/neil/.picgo/node_modules/picgo-plugin-compress/dist/compress/tinypng/tinypng.js:52:23)
    at Object.next (/Users/neil/.picgo/node_modules/picgo-plugin-compress/dist/compress/tinypng/tinypng.js:33:53)
    at fulfilled (/Users/neil/.picgo/node_modules/picgo-plugin-compress/dist/compress/tinypng/tinypng.js:24:58)
-------Error Stack End------- 
···
2019YKL commented 2 years ago

一样无法正常上传,提示req.end is not a function报错

abigmiu commented 2 years ago

一样 TypeError: req.end is not a function

supine0703 commented 3 months ago

已解决:#71