adm-zip
adm-zip copied to clipboard
The value of "offset" is out of range. It must be >= 0 and <= 30. Received 31
const AdmZip = require('adm-zip')
const filepath = './test.zip'
const zip = new AdmZip(filepath)
// main.js need to exist
const entry = zip.getEntry('main.js')
if (entry) {
zip.updateFile(entry, Buffer.from('123123123', 'utf8'))
zip.writeZip(filepath)
}
filepath is a compressed package for macOS, the first execution is normal but an error is reported if the subsequent execution continues.
zip file is a compressed package for mac system, code execution is in windows or linux system.
This issue should be fixed in v0.5.14