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

Getting TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[15], "whisper.rn").initWhisper') #206

Open
maydna opened this issue Mar 9, 2024 · 0 comments

Comments

@maydna
Copy link

maydna commented Mar 9, 2024

Hi, thanks for creating this amazing project!
I encountered the error below when initialising whisper context. Wonder if anyone could advise how to resolve it.

Code:

......
import { initWhisper } from 'whisper.rn'
......
            <TouchableOpacity
              onPress={async()=>{
                const whisperContext = await initWhisper({
                  filePath: require('../Assets/models/ggml-small.bin'),
                })
                .......
              }}
            >
.....

After clicking the button, it has the error below:

 ERROR  Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.
 WARN  Possible Unhandled Promise Rejection (id: 0):
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[15], "whisper.rn").initWhisper')
_callee5$@http://localhost:8081/index.bundle:346556:100
tryCatch@http://localhost:8081/index.bundle:23924:23
invoke@http://localhost:8081/index.bundle:24094:32
tryCatch@http://localhost:8081/index.bundle:23924:23
invoke@http://localhost:8081/index.bundle:23996:30
@http://localhost:8081/index.bundle:24026:19
tryCallTwo@http://localhost:8081/index.bundle:28654:9
doResolve@http://localhost:8081/index.bundle:28818:25
Promise@http://localhost:8081/index.bundle:28677:14
callInvokeWithMethodAndArg@http://localhost:8081/index.bundle:24025:33
enqueue@http://localhost:8081/index.bundle:24030:157
@http://localhost:8081/index.bundle:24045:69
_callee5@http://localhost:8081/index.bundle:346551:42
_performTransitionSideEffects@http://localhost:8081/index.bundle:64267:22
_receiveSignal@http://localhost:8081/index.bundle:64209:45
onResponderRelease@http://localhost:8081/index.bundle:64105:34
invokeGuardedCallbackProd@http://localhost:8081/index.bundle:3651:21
invokeGuardedCallback@http://localhost:8081/index.bundle:3755:42
invokeGuardedCallbackAndCatchFirstError@http://localhost:8081/index.bundle:3759:36
executeDispatch@http://localhost:8081/index.bundle:3837:48
executeDispatchesInOrder@http://localhost:8081/index.bundle:3857:26
executeDispatchesAndRelease@http://localhost:8081/index.bundle:5117:35
forEach@[native code]
forEachAccumulated@http://localhost:8081/index.bundle:4388:22
runEventsInBatch@http://localhost:8081/index.bundle:5141:27
runExtractedPluginEventsInBatch@http://localhost:8081/index.bundle:5221:25
@http://localhost:8081/index.bundle:5196:42
batchedUpdates$1@http://localhost:8081/index.bundle:17258:20
batchedUpdates@http://localhost:8081/index.bundle:5103:36
_receiveRootNodeIDEvent@http://localhost:8081/index.bundle:5195:23
receiveTouches@http://localhost:8081/index.bundle:5249:34
__callFunction@http://localhost:8081/index.bundle:3064:36
@http://localhost:8081/index.bundle:2788:31
__guard@http://localhost:8081/index.bundle:3015:15
callFunctionReturnFlushedQueue@http://localhost:8081/index.bundle:2787:21
callFunctionReturnFlushedQueue@[native code]

Installation successfully via:

yarn add whisper.rn
npx pod-install

My versions:

react-native-cli: 2.0.1
react-native: 0.67.1
yarn version
yarn version v1.22.0
info Current version: 0.0.1
✨  Done in 2.97s.
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