Coder Social home page Coder Social logo

Comments (3)

the0neWhoKnocks avatar the0neWhoKnocks commented on June 17, 2024

Had to go all the way back to [email protected] to get it to run.

from node-taglib-sharp.

benrr101 avatar benrr101 commented on June 17, 2024

Hi @the0neWhoKnocks, thanks for reporting this issue. I'm not a huge javascript developer, so it's entirely possible there's something I missed with the setup for the package. For background, this project is written in typescript and compiled as a CommonJS module for ES6. I remember a while back reading about compatibility issues between CommonJS and ECMAscript modules that prompted some change in compilation process probably around v3.3. The package is tested against Node v14.21.3 to allow for as much backwards compatibility as feasible. All integration testing is done from typescript. I can try upgrading to Node v20, but it'll take me a bit to get setup with ECMAscript modules to verify it works in your scenario.

In the meantime... You're sorta correct that loading the File._fileTypes gets populated by the main module. The index imports/exports all the different classes that inherit from File and at the bottom of each of those files it registers itself within File._fileTypes for the various mime-types it supports. As a potential workaround, you can try importing the specific file type you want to use (eg, MpegAudioFile) and create the file object using new MpegAudioFile("pathToFile"). If that gives any errors, that will be additional data points to help resolve this issue.

from node-taglib-sharp.

the0neWhoKnocks avatar the0neWhoKnocks commented on June 17, 2024

Ended up switching everything over to CommonJS last week to get things to work with the new version.

Good luck finding the config option to get TS to compile cjs correctly. If there is no solution, maybe note in the doc that it currently won't work in mjs files.

from node-taglib-sharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.