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

TypeError: Cannot read property 'allocUnsafe' of undefined #18

Open
josharian opened this issue Jun 8, 2021 · 3 comments
Open

TypeError: Cannot read property 'allocUnsafe' of undefined #18

josharian opened this issue Jun 8, 2021 · 3 comments

Comments

@josharian
Copy link

I'm executing this polyfill in v8, and getting:

TypeError: Cannot read property 'allocUnsafe' of undefined

It's coming from this line:

var NativeBuffer_allocUnsafe = NativeBuffer["allocUnsafe"];

Commenting out that line appears to fix the problem. Perhaps setting up NativeBuffer_allocUnsafe should be guarded by some other conditions? (My javascript is not strong.)

@kosmoz
Copy link

kosmoz commented Aug 27, 2021

Hi, I don't remember why, but we were able to fix this error by importing fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min instead of fastestsmallesttextencoderdecoder.

@chrisweight
Copy link

/EncoderDecoderTogether.min

This worked for me, cheers :)

@yunku2002
Copy link

Falling back to v1.0.21 worked for me.

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

4 participants