node-addon-api
node-addon-api copied to clipboard
Napi::HandleScope::HandleScope(const Napi::HandleScope &)cannot be referenced -- it is a deleted function
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