-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Labels
c: bugSomething isn't workingSomething isn't workingc: docsImprovements or additions to documentationImprovements or additions to documentationc: externalIssues that related to external servicesIssues that related to external servicesp: 1-normalNothing urgentNothing urgent
Milestone
Description
Pre-Checks
- Follow our Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Faker issue and not related to a combination with another package.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
- I am willing to provide a PR.
Describe the bug
When running faker.internet.jwt()
on our documentation site, you receive an runtime error:
+esm:13 Uncaught TypeError: Unknown encoding: base64url
at Uint8Array.Yi (+esm:13:5072)
at Uint8Array.a [as toString] (+esm:13:5949)
at ir (chunk-3QROWZCZ.js:1:5396)
at kr.jwt (chunk-3QROWZCZ.js:1:18786)
at <anonymous>:1:16
This might affect other browser environments as well (at least the ones using the same CDN).
Minimal reproduction code
Go to https://fakerjs.dev and open the dev tools.
Run the following:
await enableFaker();
faker.internet.jwt();
Additional Context
Our check for the existance of Buffer
fails because the file (https://cdn.jsdelivr.net/npm/@faker-js/faker@9.2.0/+esm) loaded from the cdn includes a Buffer polyfill:
Environment Info
Tested in Microsoft Edge - Version 131.0.2903.63 (Offizielles Build) (64-Bit)
Which module system do you use?
- CJS
- ESM
Used Package Manager
npm
Metadata
Metadata
Assignees
Labels
c: bugSomething isn't workingSomething isn't workingc: docsImprovements or additions to documentationImprovements or additions to documentationc: externalIssues that related to external servicesIssues that related to external servicesp: 1-normalNothing urgentNothing urgent