Closed vend1k12 closed 1 month ago
By the way yes, I've tried several import options. import * as mm from 'music-metadata'
and import { parseBuffer } from 'music-metadata'
, but there is no difference.
Note that this is an ESM module, check CommonJS backward compatibility or better, switch your project to ESM, and imports shall work as you initially expected.
Oh, thanks a lot, somehow I missed that point in the documentation <з
Is there an existing issue for this?
music-metadata version
10.5.0
Current Behavior
While running the function to check the duration time of an audio file, the
TypeError: (0 , music_metadata_1.parseBuffer) is not a function appears.
Tried using yarn, npm, pnpm but there is no difference. It doesn't matter what file I load and what type of file it is (mp3, wav, flac), and it doesn't matter what function I use (parseBuffer, parseFile, parseBlob etc). I am using Nestjs and here is the file where the error is made, as well as package.json
tracks.service.ts
package,json
Expected Behavior
No response
Attached audio sample?