Usage of deprecated functions

Open
#81 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, nodejs
Domain
build-system

Research direction

Start by building the NAN examples and locate the repeated cons->NewInstance(argc, argv) calls mentioned in the issue. Update the deprecated usage to the supported NAN form, then rebuild the examples to confirm the deprecation errors are gone.

Written by the indexing model from the issue text.

Description

Hi,

It is currently not possible to build the NAN examples, because lines like
cons->NewInstance(argc, argv)
are frequently used. However, NewInstance is deprecated and
Nan::NewInstance(cons, argc, argv).ToLocalChecked()
or similar should be used instead (see https://stackoverflow.com/questions/45388032/how-to-silence-newinstance-is-deprecated-warning-in-node-gyp-rebuild-what)

I will try to fix this, but I'm just a beginner with NAN/Node...

Dominant language
C++
Stars
2.6k
Forks
602
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nodejs/node-addon-examples

All issues in nodejs/node-addon-examples

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.