-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
value.trim()
is not a function
#2355
Comments
Hi @r-flash, that does not happen when I parse that file with [email protected]. Looking at your stack trace, you are using some post-processing of the code, maybe something odd is happening there. Neither I can explain why you ending up value being an music-metadata/lib/id3v1/ID3v1Parser.ts Line 105 in 0b1a9b7
|
Seems to work fine in the browser as well: https://audio-tag-analyzer.netlify.app/ Which JavaScript engine are you using? |
Thanks for the quick response! I'm using Node v23.4.0. I'll try to investigate whether it has something to do with the usage of Rollup. |
It is related to Node v23.4.0, same issue on my end. |
Caused by issue: nodejs/node#56219 Related to sindresorhus/file-type#703 You can reproduce the issue like this: it('Node Windows-1252 decode bug', () => {
const textDecoder = new TextDecoder('Windows-1252');
const binary = new Uint8Array([72, 101, 108, 108, 111]);
const text = textDecoder.decode(binary);
assert.strictEqual(typeof(text), 'string', 'expect a string');
}); Just update to a newer Node.js version, at least in v23.7.0 it seems resolved. |
I see, thanks a lot! |
Is there an existing issue for this?
music-metadata version
10.9.0
Current Behavior
I'm getting the following error for any MP3 file I try to run
parseFile
on. I have added some logs before the problematic line and turns out the type ofvalue
is actuallyUint8Array
, not string.Sample MP3 file
Expected Behavior
No error is thrown.
Attached audio sample?
The text was updated successfully, but these errors were encountered: