TypeError: Object(…) is not a function

问题:导入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