Fail to build with Node.js ≥ 12
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 101
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
when building with Node.js ≥ 12, I got some errors:
/usr/include/nodejs/deps/v8/include/v8.h:2588:31: note: candidate: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’
2588 | Local<String> ToString(Isolate* isolate) const);
| ^~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
311 | declarator __attribute__((deprecated(message)))
| ^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:2588:31: note: candidate expects 1 argument, 0 provided
2588 | Local<String> ToString(Isolate* isolate) const);
| ^~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
311 | declarator __attribute__((deprecated(message)))
| ^~~~~~~~~~
../src/node_zipfile.cpp:23:56: error: no matching function for call to ‘v8::Value::ToString()’
23 | #define TOSTR(obj) (*String::Utf8Value((obj)->ToString()))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the build with Node.js ≥ 12 and inspect src/node_zipfile.cpp, especially the TOSTR macro at line 23. Compare its V8 API usage with the compiler errors, then verify that the native module builds successfully with the affected Node.js versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, node.js
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100