将wav格式转mp3,使用到lamejs ,npm安装,import导入后会报错MPEGMode is not defined,这时需要根据提示修改lamejs库代码
安装patch-package
yarn add --dev patch-package postinstall-postinstall
package.json文件scripts内添加命令
"scripts": {
"postinstall": "patch-package"
},
修改lamejs内代码
Lame.js:29行
Encoder.js:112行
PsyModel.js: