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

Uncaught TypeError: SharedArrayBuffer is not a constructor #3746

Open
ronag opened this issue Oct 18, 2024 · 2 comments
Open

Uncaught TypeError: SharedArrayBuffer is not a constructor #3746

ronag opened this issue Oct 18, 2024 · 2 comments

Comments

@ronag
Copy link
Member

ronag commented Oct 18, 2024

This is more of a runtime issue but I'm still confused why/how undici requires SharedArrayBuffer.

The problem occurs with:

require('undici')
Uncaught TypeError: SharedArrayBuffer is not a constructor
    at node:internal/worker:94:32
    at NativeModule.compileForInternalLoader (node:internal/bootstrap/loaders:312:7)
    at nativeModuleRequire (node:internal/bootstrap/loaders:341:14)
    at node:worker_threads:11:5
    at NativeModule.compileForInternalLoader (node:internal/bootstrap/loaders:312:7)
    at NativeModule.compileForPublicLoader (node:internal/bootstrap/loaders:252:10)
    at loadNativeModule (node:internal/modules/cjs/helpers:44:9)
    at Function.Module._load (node:internal/modules/cjs/loader:823:15)
    at Module.require (node:internal/modules/cjs/loader:1023:19)
    at require (node:internal/modules/cjs/helpers:97:18)
@ronag
Copy link
Member Author

ronag commented Oct 18, 2024

@mcollina any ideas?

@ronag ronag changed the title Uncaught TypeError: SharedArrayBuffer is not a constructor Uncaught TypeError: SharedArrayBuffer is not a constructor Oct 18, 2024
@ronag
Copy link
Member Author

ronag commented Oct 18, 2024

Is this some internal node requirement when loading commonjs modules? Off thread module loading maybe?

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

3 participants
@ronag and others