Skip to content

[bug] Unknown encoding: base64url #361

Description

@Le0X8
const NodeBuffer = require('node:buffer').Buffer;
const BrowserBuffer = require('buffer/').Buffer;

console.log(NodeBuffer.from('Hello, world!', 'utf8').toString('base64url')); // works
//> 'SGVsbG8sIHdvcmxkIQ'

console.log(BrowserBuffer.from('Hello, world!', 'utf8').toString('base64url')); // fails

Error:

Uncaught TypeError: Unknown encoding: base64url
    slowToString index.js:544
    toString index.js:606
    encode +page.svelte:41
    <anonymous> debugger eval code:1
[index.js:544:31](http://localhost:5173/node_modules/buffer/index.js)
    slowToString index.js:544
    toString index.js:606
    encode +page.svelte:41
    <anonymous> debugger eval code:1

This may break some stuff, so should be fixed soon!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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