TypeError: Object(…) is not a function

时间:2020-08-19 21:52:40   收藏:0   阅读:498

问题:导入resampler时报错
官网:resampler = require(‘audio-resampler‘);
自己写的:import { resampler } from "audio-resampler";

解决:
因为这是一个比较老的npm包,不支持上面的那种导入方式。
修改成:
import * as resampler from "audio-resampler";

原文:https://www.cnblogs.com/xym4869/p/13530121.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!