A dependency doesn't work in the browser

Open
#3 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
javascript
Domain
frontend

Research direction

Start by reproducing the browser error and trace the entry through auto.js, polyfill.js, and index.js, especially the dependency paths shown in the stack trace. Confirm the intended browser bundle behavior and verify that loading the shim no longer raises “global is not defined” while ArrayBuffer base64 methods still work.

Written by the indexing model from the issue text.

Description

index.js:26 Uncaught ReferenceError: global is not defined
    at index.js:26:3
    at forEachArray2 (index.js:13:17)
    at forEach (index.js:63:9)
    at node_modules/typed-array-byte-offset/index.js (index.js:24:2)
    at __require (polyfill.js:3:50)
    at node_modules/es-abstract/2024/IsTypedArrayOutOfBounds.js (IsTypedArrayOutOfBounds.js:12:28)
    at __require (polyfill.js:3:50)
    at node_modules/es-arraybuffer-base64/Uint8Array.prototype.setFromBase64/implementation.js (implementation.js:12:31)
    at __require (polyfill.js:3:50)
    at node_modules/es-arraybuffer-base64/Uint8Array.prototype.setFromBase64/polyfill.js (polyfill.js:3:22)
(anonymous)	@	index.js:26
forEachArray2	@	index.js:13
forEach	@	index.js:63
node_modules/typed-array-byte-offset/index.js	@	index.js:24
__require	@	polyfill.js:3
node_modules/es-abstract/2024/IsTypedArrayOutOfBounds.js	@	IsTypedArrayOutOfBounds.js:12
__require	@	polyfill.js:3
node_modules/es-arraybuffer-base64/Uint8Array.prototype.setFromBase64/implementation.js	@	implementation.js:12
__require	@	polyfill.js:3
node_modules/es-arraybuffer-base64/Uint8Array.prototype.setFromBase64/polyfill.js	@	polyfill.js:3
__require	@	polyfill.js:3
node_modules/es-arraybuffer-base64/Uint8Array.prototype.setFromBase64/shim.js	@	shim.js:3
__require	@	polyfill.js:3
node_modules/es-arraybuffer-base64/shim.js	@	shim.js:5
__require	@	polyfill.js:3
(anonymous)	@	auto.js:3
Dominant language
JavaScript
Stars
11
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from es-shims/es-arraybuffer-base64

All issues in es-shims/es-arraybuffer-base64

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.