nestjs: sharp_1.default is not a funciton

使用import来使用sharp时,得用

import * as sharp from 'sharp';

使用import {sharp} from 'sharp',导入的是命名空间

ps:

        sharp库链接:GitHub - lovell/sharp: High performance Node.js image processing

你可能感兴趣的:(nestjs,node.js,typescript)