Skip to content

Problem in node v8.1.3 - allocateBase64Buffer is not defined #8

@mikbur

Description

@mikbur

node_modules\utf7\utf7.js:41:13)
Get this problem when caling imap.decode("F&APY-reslagna kontakter")

The workaround I have done is changeing rows 4-12 to
// if (semver.gte(semver.clean(process.version), '6.0.0')) { function allocateAsciiBuffer(length) { return Buffer.alloc(length, 'ascii'); } // } else { // function allocateAsciiBuffer(length) { // return new Buffer(length, 'ascii'); // } // }

and lines 30-38 to
//if (semver.gte(semver.clean(process.version), '6.0.0')) { function allocateBase64Buffer(str) { return Buffer.from(str, 'base64'); } // } else { // function allocateBase64Buffer(str) { // return new Buffer(str, 'base64'); // } // }

Do you have a better solution so I can continue using your npm-package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions