Unable to import lib
skliche opened this issue · 1 comments
skliche commented
When I import the library this way:
import { parseFile } from 'music-metadata
and when I call parsefile
in the following way:
async function updateId3Tag(audioFile: AudioFile) {
let metadata = await parseFile(audioFile.location)
console.log('metadata: ', metadata)
}
then I get the following error:
Error [ERR_REQUIRE_ESM]: require() of ES Module .../node_modules/music-metadata/lib/index.js
Can you give me a hint what I am doing wrong? Thx. :)