nodejs / nan

Native Abstractions for Node.js
MIT License
3.27k stars 501 forks source link

Nan with Node 18 #972

Closed sanya-adobe closed 1 month ago

sanya-adobe commented 1 month ago

I am working on a package which uses the latest version of "nan". Currently, I am on Node16 and everything works fine. There is a requirement to upgrade to Node18 but I am unable to do that as npm install gives the following error.

: note: 'SetAccessor' has been explicitly marked deprecated here
  V8_DEPRECATED("Do signature check in accessor")

The readme mentions that the package is compatible with Node 18. But I find that incorrect. My setup : Node - v18.20.4 Npm - 10.7.0 MacOS machine

agnat commented 1 month ago

Without any context it's impossible to say what's going on, but this looks like a V8 and not a NAN message. Are you calling V8 functions directly?

Some versions of SetAccessor(...) are indeed deprecated, like this one. I think the backward compatible version is here.

agnat commented 1 month ago

No discernible or actionable defect. I'm closing this.