nodejs / node-addon-examples

Node.js C++ addon examples from http://nodejs.org/docs/latest/api/addons.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Factory Wrap example correct?

bsrdjan opened this issue · comments

I could not get the ObjectWrap Factory example myobject.cc running, because env.SetInstanceData() and env.GetInstanceData() methods do not exist.

Should this example work, am I missing something?

commented

make sure these values are correct in package.json:

"engines": { "node": ">= 14.0.0" },
  "dependencies": {
    "bindings": "~1.2.1",
    "node-addon-api": "^3.0.0"
  },

Thanks, already fixed by updating NAPI version in my Cmake script.