niieani/gpt-tokenizer

ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes

Closed this issue · 1 comments

hello, i use it in rn project, it took a mistake

ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes
    at SharePage (http://localhost:8081/src\pages\share\index.bundle?platform=android&app=com.awesomeproject&modulesOnly=true&dev=true&minify=false&runModule=true&shallow=true:12:26)
    at RNGestureHandlerRootView
    at GestureHandlerRootView
    at App
    at RCTView

If you want to use it with hermes, you need to make sure that TextDecoder global is present / polyfilled first.