Borewit/music-metadata

Unable to import lib

skliche opened this issue · 1 comments

When I import the library this way:

import { parseFile } from 'music-metadata

and when I call parsefilein 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. :)

Same as #1218