node-addon-api icon indicating copy to clipboard operation
node-addon-api copied to clipboard

Napi::HandleScope::HandleScope(const Napi::HandleScope &)cannot be referenced -- it is a deleted function

Open westlakem opened this issue 2 years ago • 0 comments

Disclamer: I know very little about C++.

When trying to convert an open source project from NAN to napi, I'm getting the following error when trying to ref a HandleScope object.

function "Napi::HandleScope::HandleScope(const Napi::HandleScope &)" (declared at line 2269 of "D:\devl\js\fsuipc-node\node_modules\node-addon-api\napi.h") cannot be referenced -- it is a deleted function

converting Nan::HandleScope scope; to Napi::HandleScope::HandleScope(Napi::Env env); as referenced https://github.com/nodejs/node-addon-api/blob/main/doc/handle_scope.md

westlakem avatar Aug 17 '22 13:08 westlakem