Comments (11)
Has this been automated already?
from node-geoip.
@xantian15 yes, that is the prescribed way to do it
@leostera there is an updatedb script provided by @ctalkington
from node-geoip.
I'm trying to but running it at my projects root level I get this:
± npm --verbose run-script updatedb
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli '--verbose',
npm verb cli 'run-script',
npm verb cli 'updatedb' ]
npm info using [email protected]
npm info using [email protected]
npm verb read json path/to/my/projects/package.json
npm verb run-script [ 'preupdatedb', 'updatedb', 'postupdatedb' ]
npm info preupdatedb [email protected]
npm info updatedb [email protected]
npm info postupdatedb [email protected]
npm verb exit [ 0, true ]
npm info ok
On Apr 15, 2013, at 11:20 PM, Philip Tellis [email protected] wrote:
@xantian15 yes, that is the prescribed way to do it
@leostera there is an updatedb script provided by @ctalkington
—
Reply to this email directly or view it on GitHub.
from node-geoip.
have you tried the latest code? I just merged in some code. Also, the script ends with ok
so it's probably ok.
from node-geoip.
I'm using https://github.com/bluesmoon/node-geoip/tarball/master as the source in my package.json.
After running it I still don't have the big .dat files in my data folder.
I tried this too:
± npm --verbose run-script geoip-lite updatedb
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli '--verbose',
npm verb cli 'run-script',
npm verb cli 'geoip-lite',
npm verb cli 'updatedb' ]
npm info using [email protected]
npm info using [email protected]
npm verb read json /Users/leostera/Repositories/farmshares/node_modules/geoip-lite/package.json
npm verb run-script [ 'preupdatedb', 'updatedb', 'postupdatedb' ]
npm info preupdatedb [email protected]
npm info updatedb [email protected]
npm verb unsafe-perm in lifecycle true
[email protected] updatedb /Users/leostera/Repositories/farmshares/node_modules/geoip-lite
node scripts/updatedb.js
module.js:340
throw err;
^
Error: Cannot find module '/Users/leostera/Repositories/farmshares/node_modules/geoip-lite/scripts/updatedb.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
npm info [email protected] Failed to exec updatedb script
Now I just tried using https://github.com/bluesmoon/node-geoip as the source in the package.json but I get this error:
npm ERR! not a package /var/folders/cs/gdky9k5x2jzgsvwytf36hqdh0000gn/T/npm-19264/1366079596273-0.1913695263210684/tmp.tgz
npm ERR! Error: ENOENT, open '/var/folders/cs/gdky9k5x2jzgsvwytf36hqdh0000gn/T/npm-19264/1366079596273-0.1913695263210684/package/package.json'
Thanks for your help :)
On Apr 15, 2013, at 11:31 PM, Philip Tellis [email protected] wrote:
o, the script ends with ok so it's probably ok.
from node-geoip.
Ok, I manually added the update.js file to the scripts folder (because it wasn't being installed with npm, regardless of the source).
Then cd node_modules/geoip-lite && npm i
And then go back two levels and run npm run-script geoip-lite updatedb
And then it works.
On Apr 15, 2013, at 11:34 PM, Leandro Ostera Villalva [email protected] wrote:
I'm using https://github.com/bluesmoon/node-geoip/tarball/master as the source in my package.json.
After running it I still don't have the big .dat files in my data folder.
I tried this too:
± npm --verbose run-script geoip-lite updatedb
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli '--verbose',
npm verb cli 'run-script',
npm verb cli 'geoip-lite',
npm verb cli 'updatedb' ]
npm info using [email protected]
npm info using [email protected]
npm verb read json /Users/leostera/Repositories/farmshares/node_modules/geoip-lite/package.json
npm verb run-script [ 'preupdatedb', 'updatedb', 'postupdatedb' ]
npm info preupdatedb [email protected]
npm info updatedb [email protected]
npm verb unsafe-perm in lifecycle true[email protected] updatedb /Users/leostera/Repositories/farmshares/node_modules/geoip-lite
node scripts/updatedb.jsmodule.js:340
throw err;
^
Error: Cannot find module '/Users/leostera/Repositories/farmshares/node_modules/geoip-lite/scripts/updatedb.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
npm info [email protected] Failed to exec updatedb scriptNow I just tried using https://github.com/bluesmoon/node-geoip as the source in the package.json but I get this error:
npm ERR! not a package /var/folders/cs/gdky9k5x2jzgsvwytf36hqdh0000gn/T/npm-19264/1366079596273-0.1913695263210684/tmp.tgz
npm ERR! Error: ENOENT, open '/var/folders/cs/gdky9k5x2jzgsvwytf36hqdh0000gn/T/npm-19264/1366079596273-0.1913695263210684/package/package.json'Thanks for your help :)
On Apr 15, 2013, at 11:31 PM, Philip Tellis [email protected] wrote:o, the script ends with ok so it's probably ok.
from node-geoip.
Also using
"geoip-lite": "*"
instead of using the github repo, works.
On Apr 15, 2013, at 11:34 PM, Leandro Ostera Villalva [email protected] wrote:
I'm using https://github.com/bluesmoon/node-geoip/tarball/master as the source in my package.json.
After running it I still don't have the big .dat files in my data folder.
I tried this too:
± npm --verbose run-script geoip-lite updatedb
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli '--verbose',
npm verb cli 'run-script',
npm verb cli 'geoip-lite',
npm verb cli 'updatedb' ]
npm info using [email protected]
npm info using [email protected]
npm verb read json /Users/leostera/Repositories/farmshares/node_modules/geoip-lite/package.json
npm verb run-script [ 'preupdatedb', 'updatedb', 'postupdatedb' ]
npm info preupdatedb [email protected]
npm info updatedb [email protected]
npm verb unsafe-perm in lifecycle true[email protected] updatedb /Users/leostera/Repositories/farmshares/node_modules/geoip-lite
node scripts/updatedb.jsmodule.js:340
throw err;
^
Error: Cannot find module '/Users/leostera/Repositories/farmshares/node_modules/geoip-lite/scripts/updatedb.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
npm info [email protected] Failed to exec updatedb scriptNow I just tried using https://github.com/bluesmoon/node-geoip as the source in the package.json but I get this error:
npm ERR! not a package /var/folders/cs/gdky9k5x2jzgsvwytf36hqdh0000gn/T/npm-19264/1366079596273-0.1913695263210684/tmp.tgz
npm ERR! Error: ENOENT, open '/var/folders/cs/gdky9k5x2jzgsvwytf36hqdh0000gn/T/npm-19264/1366079596273-0.1913695263210684/package/package.json'Thanks for your help :)
On Apr 15, 2013, at 11:31 PM, Philip Tellis [email protected] wrote:o, the script ends with ok so it's probably ok.
from node-geoip.
Can you try with the new package? There have been a few fixes.
from node-geoip.
Looks like it does not work with the last version of the city data
$ npm run-script geoip-lite updatedb
> [email protected] updatedb project_dir/node_modules/geoip-lite
> node scripts/updatedb.js
Retrieving GeoIPCountryCSV.zip ... DONE
Extracting GeoIPCountryCSV.zip ... DONE
Processing Data (may take a moment) ... DONE
Retrieving GeoIPv6.csv ... DONE
Processing Data (may take a moment) ... DONE
Retrieving GeoLiteCity-latest.zip ... DONE
Extracting GeoLiteCity-latest.zip ... DONE
Processing Data (may take a moment) ...
Still working (215445) ...
Still working (429268) ...
Still working (639016) ...
Still working (845422) ...
Still working (1064808) ...
Still working (1279583) ...
Still working (1491840) ...
Still working (1705210) ...
buffer.js:784
throw TypeError('value is out of bounds');
^
TypeError: value is out of bounds
at TypeError (<anonymous>)
at checkInt (buffer.js:784:11)
at Buffer.writeInt32BE (buffer.js:924:5)
at processLine (project_dir/node_modules/geoip-lite/scripts/updatedb.js:337:5)
at project_dir/node_modules/geoip-lite/node_modules/lazy/lazy.js:99:35
at Lazy.<anonymous> (project_dir/node_modules/geoip-lite/node_modules/lazy/lazy.js:74:37)
at Lazy.EventEmitter.emit (events.js:98:17)
at Lazy.<anonymous> (project_dir/node_modules/geoip-lite/node_modules/lazy/lazy.js:74:22)
at Lazy.EventEmitter.emit (events.js:98:17)
at Lazy.<anonymous> (project_dir/node_modules/geoip-lite/node_modules/lazy/lazy.js:74:22)
npm ERR! [email protected] updatedb: `node scripts/updatedb.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] updatedb script.
npm ERR! This is most likely a problem with the geoip-lite package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/updatedb.js
npm ERR! You can get their info via:
npm ERR! npm owner ls geoip-lite
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-14-generic
npm ERR! command "node" "/usr/local/bin/npm" "run-script" "geoip-lite" "updatedb"
npm ERR! cwd project_dir
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! project_dir/npm-debug.log
npm ERR! not ok code 0
from node-geoip.
Ok my bad, it works fine with the last version from github.
I ran this command on the packaged version of npm repository.
You may want to update the package though.
from node-geoip.
It seems this has been resolved
from node-geoip.
Related Issues (20)
- Make updatedb fast
- Library unusable due to "colors" module debacle HOT 1
- URLs in updatedb.js no longer work
- ERR_BUFFER_OUT_OF_BOUNDS after automatic update HOT 2
- Re: Database updates HOT 16
- Custom directory in updatedb doesn't work. HOT 6
- Sometimes geoip return null value HOT 3
- returns wrong country for 72.18.74.123 HOT 1
- Update database HOT 1
- 401 Unauthorized when trying to upgrade HOT 8
- Upgrade is extremely slow. HOT 4
- Get the postal / zip code ? HOT 1
- The included data is out of date HOT 2
- remove fs dependency
- IP from US but the returned result is from Africa HOT 3
- Incorrect geolocation for non-geolocated IPs HOT 8
- IPv6 not working HOT 4
- Error in getting the Info HOT 2
- Seeking insight into the development process and buffer lookup approach used. HOT 2
- updatedb.js: ERROR: HTTP Request Failed [302 Found]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-geoip.