node-geoip2
node-geoip2 copied to clipboard
geoIp2 support for node v10.12.0
I recently upgraded the node version and the npm install fails with the following error
make: *** [Release/obj.target/node_mmdb/src/node_mmdb.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/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/9.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /
I've same issue too.
It stops installing with deprecations:
$ npm i --save geoip2
> [email protected] install /hidden/node_modules/geoip2
> node-gyp rebuild
CC(target) Release/obj.target/libmaxminddb/deps/libmaxminddb/src/maxminddb.o
LIBTOOL-STATIC Release/maxminddb.a
CXX(target) Release/obj.target/node_mmdb/src/node_mmdb.o
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
In file included from ../node_modules/nan/nan.h:190:
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: no member
named 'ForceSet' in 'v8::Object'
return obj->ForceSet(GetCurrentContext(), key, value...
~~~ ^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
In file included from ../node_modules/nan/nan.h:196:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:345:28: warning:
'New' is deprecated [-Wdeprecated-declarations]
return v8::StringObject::New(value).As<v8::StringObject>();
^
/Users/num8er/.node-gyp/10.12.0/include/node/v8.h:5052:3: note:
'New' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate* version",
^
/Users/num8er/.node-gyp/10.12.0/include/node/v8config.h:327:29: note:
expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
../node_modules/nan/nan.h:816:18: warning: 'MakeCallback' is
deprecated: Use MakeCallback(..., async_context)
[-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:175:1: note:
'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:91:20: note:
expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
../node_modules/nan/nan.h:830:18: warning: 'MakeCallback' is
deprecated: Use MakeCallback(..., async_context)
[-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:168:1: note:
'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:91:20: note:
expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
../node_modules/nan/nan.h:844:18: warning: 'MakeCallback' is
deprecated: Use MakeCallback(..., async_context)
[-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:161:1: note:
'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:91:20: note:
expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
../node_modules/nan/nan.h:890:44: warning: 'ToString' is
deprecated [-Wdeprecated-declarations]
v8::Local<v8::String> string = from->ToString();
^
/Users/num8er/.node-gyp/10.12.0/include/node/v8.h:2454:10: note:
'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Strin...
^
/Users/num8er/.node-gyp/10.12.0/include/node/v8config.h:327:29: note:
expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
../node_modules/nan/nan.h:900:27: warning: 'WriteUtf8' is
deprecated [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast<i...
^
/Users/num8er/.node-gyp/10.12.0/include/node/v8.h:2658:3: note:
'WriteUtf8' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate* version",
^
/Users/num8er/.node-gyp/10.12.0/include/node/v8config.h:327:29: note:
expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/node_mmdb.cpp:2:
In file included from ../src/node_mmdb.h:6:
../node_modules/nan/nan.h:1457:31: warning: 'MakeCallback' is
deprecated: Use MakeCallback(..., async_context)
[-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:175:1: note:
'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/num8er/.node-gyp/10.12.0/include/node/node.h:91:20: note:
expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
7 warnings and 1 error generated.
seems this repo is dead
Upgrading nan does the trick, but the author does not approve the pull requests.
I've published a fixed version to npm you can use in the meantime - https://www.npmjs.com/package/@signatu/geoip2
I just installed maxmind
geoip library :)
Just use this: https://www.npmjs.com/package/maxmind