Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Unknown encoding: base64url #361

Open
Le0X8 opened this issue May 28, 2024 · 1 comment
Open

[bug] Unknown encoding: base64url #361

Le0X8 opened this issue May 28, 2024 · 1 comment

Comments

@Le0X8
Copy link

Le0X8 commented May 28, 2024

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!

@Le0X8
Copy link
Author

Le0X8 commented May 28, 2024

@feross please merge #314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant