Type: Bug Report
Version used:
Version (stable release): v1.0.0
Commit ID (development release): a7a849e
name and version
when I run npm install, error 404 "not fount" https://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
Update package [email protected] or change url from download
> [email protected] postinstall /app/flood/node_modules/geoip-country-only
> npm run-script updatedb
> [email protected] updatedb /app/flood/node_modules/geoip-country-only
> node scripts/updatedb.js
Fetching https://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
Retrieving GeoIPCountryCSV.zip .../app/flood/node_modules/geoip-country-only/scripts/updatedb.js:111
console.log('ERROR'.red + ': HTTP Request Failed [%d %s]', status, https.STATUS_CODES[status]);
^
TypeError: Cannot read property '404' of undefined
at ClientRequest.onResponse (/app/flood/node_modules/geoip-country-only/scripts/updatedb.js:111:89)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:558:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at TLSSocket.socketOnData (_http_client.js:454:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
duplicate of #750
@noeuse Please fill this, this is important:
* Version used:
+ Version (stable release) `git --no-pager tag`
+ Commit ID (development release) `git --no-pager log -1`
instead of development release
@noraj
Version used:
Version (stable release): v1.0.0
Commit ID (development release): a7a849e
Found the cause. This package is ancient (last updated 2 years ago) and gets its data from GeoLite. GeoLite2 has been around for a while and GeoLite was deprecated sometime last year.
On 2nd January 2019 they removed the legacy GeoLite dataset from the website, so requests to it will now 404 - as per the error we're getting.
See: https://github.com/bluesmoon/node-geoip/issues/85#issuecomment-373958249
@noraj no more information is needed :smile:
Solution would be to ditch geoip-country-only and use geoip-lite (which the former was a stripped down fork of) which is actively maintained and recently added support for GeoLite2 (https://github.com/bluesmoon/node-geoip/pull/138).
It's ~10 KB versus the current ~6 KB dependency so not that much of a size increase.
This is now fixed and can be closed.
Most helpful comment
Found the cause. This package is ancient (last updated 2 years ago) and gets its data from GeoLite. GeoLite2 has been around for a while and GeoLite was deprecated sometime last year.
On 2nd January 2019 they removed the legacy GeoLite dataset from the website, so requests to it will now 404 - as per the error we're getting.
See: https://github.com/bluesmoon/node-geoip/issues/85#issuecomment-373958249
@noraj no more information is needed :smile:
Solution would be to ditch
geoip-country-onlyand usegeoip-lite(which the former was a stripped down fork of) which is actively maintained and recently added support for GeoLite2 (https://github.com/bluesmoon/node-geoip/pull/138).It's ~10 KB versus the current ~6 KB dependency so not that much of a size increase.