Coder Social home page Coder Social logo

Comments (26)

subframe7536 avatar subframe7536 commented on September 26, 2024

hot fix: subframe7536@0418881

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024

Thank you for your reply. Installing your version of it throws another error. Would appreciate if you could tell me what I would need to do to fix this

import taglib from "node-taglib-sharp-extend";
const { File } = taglib;
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in Z:\Development\taglib\node_modules\node-taglib-sharp-extend\package.json imported from Z:\Development\taglib\index.js      
    at new NodeError (node:internal/errors:406:5)
    at exportsNotFound (node:internal/modules/esm/resolve:268:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:542:13)
    at packageResolve (node:internal/modules/esm/resolve:772:14)
    at moduleResolve (node:internal/modules/esm/resolve:838:20)
    at defaultResolve (node:internal/modules/esm/resolve:1043:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v20.9.0```

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

Please try

import { File } from "node-taglib-sharp-extend";

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024

Same error.

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

Fixed in v0.2.7

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024
Z:\Development\taglib>node index   
node:internal/errors:497
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'Z:\Development\taglib\node_modules\.pnpm\[email protected][email protected]\node_modules\node-taglib-sharp-extend\dist\taglib\byteVector' imported from Z:\Development\taglib\node_modules\.pnpm\[email protected][email protected]\node_modules\node-taglib-sharp-extend\dist\taglib\index.js
    at new NodeError (node:internal/errors:406:5)
    at finalizeResolution (node:internal/modules/esm/resolve:233:11)
    at moduleResolve (node:internal/modules/esm/resolve:845:10)
    at defaultResolve (node:internal/modules/esm/resolve:1043:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36) {
  url: 'file:///Z:/Development/taglib/node_modules/.pnpm/[email protected][email protected]/node_modules/node-taglib-sharp-extend/dist/taglib/byteVector',
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.9.0

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

Sorry, this package only support modern bundlers.

You can try esno

edit: after some works, everything should be OK in v0.2.8

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024

Thank you, it works as expected. However typescript still throws this error
Property 'File' does not exist on type 'typeof import("Z:/Development/taglib/node_modules/.pnpm/[email protected][email protected]/node_modules/node-taglib-sharp-extend/dist/index", { with: { "resolution-mode": "import" } })'.

import * as taglib from "node-taglib-sharp-extend";
const { File } = taglib; 

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

Sorry I have no idea with that. The type resolution have no error according to this site

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024

I see. Perhaps typescript is not emitting the declaration files properly? The index.d.ts file is just export * from 'node-taglib-sharp-memory/src';

image

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

I found that you are right, I used the function under utils when processing files myself, and did not find the default import error. And the above inspection website also found no errors, so it was published. I think I need to export types a different way.

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

finally... v0.2.9

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024

Thanks a lot! It's working fine and the intellisense works too:D Sorry to be a bother but I had a last question, when trying to add the tags the file gets corrupted. I don't think it's the library's fault but rather yt-dlp where I am getting my file from. Since the library works fine and I am only getting this issue with recently downloaded files. Can you suggest me a way of fixing it?

// myFile.corruptionReasons
[
  'Box header specified a size of 805306368 bytes but only 3478550 bytes left in the file'
]

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

sure, please provide a minimal reproduction and source audio file

from node-taglib-sharp.

Anogh297 avatar Anogh297 commented on September 26, 2024

yt-dlp executable yt-dlp https://www.youtube.com/watch?v=2SUwOgmvzK4 -f m4a

audio.zip

from node-taglib-sharp.

subframe7536 avatar subframe7536 commented on September 26, 2024

This seems to be an existing issue in C# implemention: mono/taglib-sharp#306

@benrr101 @digimezzo any idea?

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.