When I try to pass a callback function as an argument, I get the following error.
at Function.set (/Users/karthick/work/node_modules/.pnpm/@lwahonen+ffi-napi@4.0.12/node_modules/@lwahonen/ffi-napi/lib/function.js:107:11)
at Object.set (/Users/karthick/work/node_modules/.pnpm/@lwahonen+ref-napi@4.0.8/node_modules/@lwahonen/ref-napi/lib/ref.js:492:10)
at Object.alloc (/Users/karthick/work/node_modules/.pnpm/@lwahonen+ref-napi@4.0.8/node_modules/@lwahonen/ref-napi/lib/ref.js:526:13)
at Object.proxy [as asr_start] (/Users/karthick/work/node_modules/.pnpm/@lwahonen+ffi-napi@4.0.12/node_modules/@lwahonen/ffi-napi/lib/_foreign_function.js:50:28)
I found that this error stems from the fact that function.js expects a value of type Buffer or function, whereas the type of value passed is PointerBuffer.
When I try to pass a callback function as an argument, I get the following error.
I found that this error stems from the fact that
function.js
expects avalue
of typeBuffer
orfunction
, whereas the type of value passed isPointerBuffer
.