Having issues with iptrie 0.0.7

Hello,

I am trying to use the iptrie npm package. I tried to pull in the latest iptrie version 0.0.7 and getting node-gyp build issue. Can you please help with what I am doing incorrect here? Here is the output from my console.

BHMADHAV-M-K3QF:tmp bhmadhav$ git clone https://github.com/postwait/node-iptrie.git
Cloning into ‘node-iptrie’…
remote: Enumerating objects: 132, done.
remote: Total 132 (delta 0), reused 0 (delta 0), pack-reused 132
Receiving objects: 100% (132/132), 29.28 KiB | 516.00 KiB/s, done.
Resolving deltas: 100% (59/59), done.
BHMADHAV-M-K3QF:tmp bhmadhav$ cd node-iptrie/
BHMADHAV-M-K3QF:node-iptrie bhmadhav$ node -v
v10.16.0
BHMADHAV-M-K3QF:node-iptrie bhmadhav$ npm -v
6.9.0
BHMADHAV-M-K3QF:node-iptrie bhmadhav$ node-gyp -v
v5.0.3
BHMADHAV-M-K3QF:node-iptrie bhmadhav$ node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.16.0 | darwin | x64
gyp info find Python using Python version 2.7.10 found at “/usr/bin/python”
gyp info spawn /usr/bin/python
gyp info spawn args [ ‘/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py’,
gyp info spawn args ‘binding.gyp’,
gyp info spawn args ‘-f’,
gyp info spawn args ‘make’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/Users/bhmadhav/Downloads/tmp/node-iptrie/build/config.gypi’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/usr/local/lib/node_modules/node-gyp/addon.gypi’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/common.gypi’,
gyp info spawn args ‘-Dlibrary=shared_library’,
gyp info spawn args ‘-Dvisibility=default’,
gyp info spawn args ‘-Dnode_root_dir=/Users/bhmadhav/Library/Caches/node-gyp/10.16.0’,
gyp info spawn args ‘-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp’,
gyp info spawn args ‘-Dnode_lib_file=/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/<(target_arch)/node.lib’,
gyp info spawn args ‘-Dmodule_root_dir=/Users/bhmadhav/Downloads/tmp/node-iptrie’,
gyp info spawn args ‘-Dnode_engine=v8’,
gyp info spawn args ‘–depth=.’,
gyp info spawn args ‘–no-parallel’,
gyp info spawn args ‘–generator-output’,
gyp info spawn args ‘build’,
gyp info spawn args ‘-Goutput_dir=.’ ]
gyp info ok
BHMADHAV-M-K3QF:node-iptrie bhmadhav$ node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.16.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
CXX(target) Release/obj.target/iptrie/src/iptrie.o
…/src/iptrie.cc:180:25: warning: ‘Utf8Value’ is deprecated [-Wdeprecated-declarations]
String::Utf8Value ipaddress(args[0]->ToString());
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8.h:2891:5: note: ‘Utf8Value’ has been explicitly marked deprecated here
V8_DEPRECATED(“Use Isolate version”,
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8config.h:327:29: note: expanded from macro ‘V8_DEPRECATED’
declarator attribute((deprecated))
^
…/src/iptrie.cc:181:42: error: too few arguments to function call, single argument ‘context’ was not specified
int prefix_len = args[1]->ToUint32()->Value();
~~~~~~~~~~~~~~~~~ ^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8.h:2435:3: note: ‘ToUint32’ declared here
V8_WARN_UNUSED_RESULT MaybeLocal ToUint32(
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8config.h:416:31: note: expanded from macro ‘V8_WARN_UNUSED_RESULT’
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
…/src/iptrie.cc:209:25: warning: ‘Utf8Value’ is deprecated [-Wdeprecated-declarations]
String::Utf8Value ipaddress(args[0]->ToString());
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8.h:2891:5: note: ‘Utf8Value’ has been explicitly marked deprecated here
V8_DEPRECATED(“Use Isolate version”,
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8config.h:327:29: note: expanded from macro ‘V8_DEPRECATED’
declarator attribute((deprecated))
^
…/src/iptrie.cc:210:42: error: too few arguments to function call, single argument ‘context’ was not specified
int prefix_len = args[1]->ToUint32()->Value();
~~~~~~~~~~~~~~~~~ ^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8.h:2435:3: note: ‘ToUint32’ declared here
V8_WARN_UNUSED_RESULT MaybeLocal ToUint32(
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8config.h:416:31: note: expanded from macro ‘V8_WARN_UNUSED_RESULT’
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
…/src/iptrie.cc:228:25: warning: ‘Utf8Value’ is deprecated [-Wdeprecated-declarations]
String::Utf8Value ipaddress(args[0]->ToString());
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8.h:2891:5: note: ‘Utf8Value’ has been explicitly marked deprecated here
V8_DEPRECATED(“Use Isolate version”,
^
/Users/bhmadhav/Library/Caches/node-gyp/10.16.0/include/node/v8config.h:327:29: note: expanded from macro ‘V8_DEPRECATED’
declarator attribute((deprecated))
^
3 warnings and 2 errors generated.
make: *** [Release/obj.target/iptrie/src/iptrie.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command “/usr/local/bin/node” “/usr/local/bin/node-gyp” “build”
gyp ERR! cwd /Users/bhmadhav/Downloads/tmp/node-iptrie
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
BHMADHAV-M-K3QF:node-iptrie bhmadhav$

(You might get an answer here, but because this forum is focused on npm, you might want to ask your question somewhere that targets experts with your package. I have moved your topic to #community:javascript)

Hi, I did not receive any feedback from anyone. Will there be any other forum where I can post and get help?
Thanks

In general the first three things I try are the home page for the package for tips and any help instructions, the issues of the project GitHub repository, and a search for the issue in a search engine. And I usually try the search first. :slight_smile:

node-iptrie has a prerelease version number (less than 1.0.0) and has had only one update in the last five years. I do not know where you might find active users.

Thanks. It is a problem with this version. We found a fix in another git. We will follow up to get it fixed here as well.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.