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

Add examples for NodeJS #280

Merged
merged 16 commits into from
Nov 12, 2023
Merged

Add examples for NodeJS #280

merged 16 commits into from
Nov 12, 2023

Conversation

csukuangfj
Copy link
Collaborator

@csukuangfj csukuangfj commented Nov 12, 2023

The CI reports the following error after successfully decoding a file.

I am not familiar with nodejs.

Any help is appreciated.

https://github.com/csukuangfj/sherpa-ncnn/actions/runs/6841272416/job/18601451413#step:8:540

#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7ffe3e50dca0
 1: 0xb72001  [node]
 2: 0x1bfa314 V8_Fatal(char const*, ...) [node]
 3: 0xfb7791 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
 4: 0xd09188 v8::ArrayBuffer::GetBackingStore() [node]
 5: 0xabced0 napi_get_typedarray_info [node]
 6: 0x7f87144053ac  [/home/runner/work/sherpa-ncnn/sherpa-ncnn/nodejs-examples/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
 7: 0x7f8714405b48  [/home/runner/work/sherpa-ncnn/sherpa-ncnn/nodejs-examples/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
 8: 0x7f8714407831  [/home/runner/work/sherpa-ncnn/sherpa-ncnn/nodejs-examples/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
 9: 0x7f871440d4ab Napi::details::CallbackData<void (*)(Napi::CallbackInfo const&), void>::Wrapper(napi_env__*, napi_callback_info__*) [/home/runner/work/sherpa-ncnn/sherpa-ncnn/nodejs-examples/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
10: 0xab380d  [node]
11: 0xd3df8e  [node]
12: 0xd3f3af v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x15d9f39  [node]
./run.sh: line 34:  4556 Trace/breakpoint trap   (core dumped) node ./test.js

@csukuangfj
Copy link
Collaborator Author

csukuangfj commented Nov 12, 2023

Note that NodeJS 18, 20, and 21 are known not to work due to
node-ffi-napi/node-ffi-napi#244

I am using

$ node --version
v16.20.2

@csukuangfj
Copy link
Collaborator Author

Downgrading node to v13.14 fixes the error.

See
node-ffi-napi/node-ffi-napi#97
for details.

@csukuangfj csukuangfj merged commit 693ea42 into k2-fsa:master Nov 12, 2023
19 of 23 checks passed
@csukuangfj csukuangfj deleted the nodejs branch November 12, 2023 15:13
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

Successfully merging this pull request may close these issues.

1 participant