mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: import problem
This commit is contained in:
parent
07cd611568
commit
4bee340d24
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ async function resizeAndCropImage (inputFilePath, outputFilePath, size = 512) {
|
|||
// Determine the maximum dimension of the input image
|
||||
let sharp
|
||||
try {
|
||||
sharp = await import('sharp')
|
||||
sharp = (await import('sharp')).default
|
||||
} catch (e) {
|
||||
logger.error('sharp未安装,请执行 pnpm install sharp@0.31.3')
|
||||
throw new Error('sharp未安装,请执行 pnpm install sharp@0.31.3')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue