mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 14:27:10 +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
|
// Determine the maximum dimension of the input image
|
||||||
let sharp
|
let sharp
|
||||||
try {
|
try {
|
||||||
sharp = await import('sharp')
|
sharp = (await import('sharp')).default
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error('sharp未安装,请执行 pnpm install sharp@0.31.3')
|
logger.error('sharp未安装,请执行 pnpm install sharp@0.31.3')
|
||||||
throw new 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