id3js in giving RangeError: Offset is outside the bounds of the DataView <p>I'm trying to move bulk mp3 files from one directory to other directory and renaming them on the basis of their name/title/album name. I'm using id3js for finding its id3 values:</p> <p>My code snippet as follows:</p> <pre><code>let files = []; let walker = walk.walk(arg['search'], { followLinks: false }); walker.on('file', (root, stat, next)=&gt;{ if(!strReg.test(""+root)) { let typ = stat.name.split("."); if (stat.name.substring(stat.name.lastIndexOf(".")) == '.mp3') { files.push({nm:stat.name,pth:root + ""+path.sep + stat.name}); } } next(); }); walker.on('end', function() { console.log("files are: ",files); files.forEach((o, i)=&gt; { console.log((i/files.length*100),"% done and Working on :",o.nm); try { id3({file: o.pth, type: id3.OPEN_LOCAL}, function (err, tags) { let itsNm; if (o.nm.indexOf(".com") == -1 &amp;&amp; o.nm.indexOf(".in") == -1) { itsNm = o.nm.substring(0, o.nm.lastIndexOf(".")).replace(/[^A-Za-z ]+/gi, '').trim(); } else if (tags.title &amp;&amp; tags.title.indexOf(".com") == -1 &amp;&amp; tags.title.indexOf(".in") == -1) { itsNm = tags.title.substring(0, tags.title.lastIndexOf(".")).replace(/[^A-Za-z ]+/gi, '').trim(); } else if (tags.album &amp;&amp; tags.album.indexOf(".com") == -1 &amp;&amp; tags.album.indexOf(".in") == -1) { itsNm = tags.album .substring(0, tags.album .lastIndexOf(".")).replace(/[^A-Za-z ]+/gi, '').trim(); } else { itsNm = o.nm.substring(0, o.nm.lastIndexOf(".")).replace(/[^A-Za-z ]+/gi, '').trim(); } fs.createReadStream(o.pth) .pipe(fs.createWriteStream(path.join(arg["out"], itsNm + o.nm.substring(o.nm.lastIndexOf("."))))); }); } catch (e){ console.log(e); } }); }) </code></pre> <p>But it gives following error:</p> <pre><code>frameBit = dv.getUint8(position + i); ^ RangeError: Offset is outside the bounds of the DataView at DataView.getUint8 (native) at D:\projBulderMac\node_modules\id3js\dist\id3.js:928:22 at D:\projBulderMac\node_modules\id3js\dist\id3.js:118:4 at FSReqWrap.wrapper [as oncomplete] (fs.js:576:17) </code></pre>