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

ReferenceError: Can't find variable: global #442

Open
EvilTrev opened this issue Mar 6, 2024 · 1 comment
Open

ReferenceError: Can't find variable: global #442

EvilTrev opened this issue Mar 6, 2024 · 1 comment

Comments

@EvilTrev
Copy link

EvilTrev commented Mar 6, 2024

typedarray-pool attempts to use the global object here:

//Legacy pool support
if(!global.__TYPEDARRAY_POOL) {
  global.__TYPEDARRAY_POOL = {
.......
  }
}

I'm running TypeScript tsx files with vite. The code is little more than the HelloGL example at this point. Thoughts? It looks like typed array pool should probably be using globalThis, or a more elaborate section of code (like the one shown here: stephenh/ts-proto#70 (comment)).

library version

├─┬ gl-react-dom@5.2.1
│ └── gl-react@5.2.0 deduped
└── gl-react@5.2.0
@EvilTrev
Copy link
Author

EvilTrev commented Mar 6, 2024

For now I'm inserting a small script that sets global = {} in my index.html as a workaround.

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

No branches or pull requests

1 participant