buf.readInt16BE is not a function
See original GitHub issueWhen trying to use parseFile on mp3 files, thanks to a Node script, I have the following error on some files:
TypeError: buf.readInt16BE is not a function
at Object.get (/Users/quentin/Desktop/audio-resource-manager/node_modules/token-types/lib/index.js:108:20)
at FileTokenizer.readNumber (/Users/quentin/Desktop/audio-resource-manager/node_modules/strtok3/lib/AbstractTokenizer.js:52:22)
at MpegParser.parseCrc (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/mpeg/MpegParser.js:432:20)
at MpegParser.parseAudioFrameHeader (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/mpeg/MpegParser.js:396:13)
at MpegParser._parse (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/mpeg/MpegParser.js:233:24)
at MpegParser.parseID3v2 (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js:41:9)
at MpegParser.parse (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js:24:13)
at Function._parse (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/ParserFactory.js:161:9)
at parseFile (/Users/quentin/Desktop/audio-resource-manager/node_modules/music-metadata/lib/index.js:46:16)
Node v16.5.0 MacOS BigSur
Bug mp3 file example: Example file.zip
Not sure if it can help but I did not have the issue with music-metadata@7.8.5 but with music-metadata@7.8.8. And now, returning on music-metadata@7.8.5 is not working anymore.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Node.js Buffer.readInt16BE() Method - GeeksforGeeks
The Buffer.readInt16BE() Method is an inbuilt application programming interface of class Buffer with in Buffer module which reads a 16-bit ...
Read more >How to fix 'TypeError: Buffer.from is not a function'?
While trying to use ipfs-api in my application, I am getting below error: ERROR TypeError: Buffer.from is not a function at varintEncode (vendor ......
Read more >TypeError readInt64BE is not a function · Issue #2 - GitHub
Reading an Int64 value fails with error TypeError: this.buffer.readInt64BE is not a function at Decoder.parse ...
Read more >Buffer | Node.js v19.3.0 Documentation
When decoding a Buffer into a string that does not exclusively contain valid UTF-8 data, the Unicode replacement character U+FFFD will...
Read more >What is readInt16BE() Buffer module in Node.js? - Educative.io
The readInt16BE method is used to read a signed, big-endian 16-bit integer at an offset provided in the function's arguments. The bytes read...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is your issue solved @qboisson by upgrading to music-metadata v7.9.0?
Ah, okay good, just did another release to freeze the version of the problematic dependencies.