From 21f51c5d84372bcdc05554ef024c164f09e0c947 Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 2 Feb 2026 18:47:38 -0800 Subject: [PATCH] =?UTF-8?q?fix(c2c-bot):=20=E4=BF=AE=E5=A4=8D=20sharp=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=96=B9=E5=BC=8F=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=B0=B4=E5=8D=95=E7=94=9F=E6=88=90=20is=20not=20a=20function?= =?UTF-8?q?=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NestJS 使用 CommonJS 模块系统,`import sharp from 'sharp'` 编译后 生成 `sharp_1.default` 调用,但 sharp 没有 default export。 改为 `import * as sharp from 'sharp'` 修复。 Co-Authored-By: Claude Opus 4.5 --- .../src/application/services/payment-proof.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/trading-service/src/application/services/payment-proof.service.ts b/backend/services/trading-service/src/application/services/payment-proof.service.ts index 18700e1e..2be0be87 100644 --- a/backend/services/trading-service/src/application/services/payment-proof.service.ts +++ b/backend/services/trading-service/src/application/services/payment-proof.service.ts @@ -1,7 +1,7 @@ import { Injectable, Logger } from '@nestjs/common'; import * as fs from 'fs'; import * as path from 'path'; -import sharp from 'sharp'; +import * as sharp from 'sharp'; export interface ProofData { orderNo: string;