sapics/geoip-country

ENOENT: no such file or directory on Vercel

kuncevic opened this issue · 2 comments

I've just deployed a nodejs app on vercel that rely on geoip-country

Have got the error related to the location of the data file Error: ENOENT: no such file or directory, open '/var/task/node_modules/geoip-country/data/geoip-country.dat'

Any ideas what is the root of the problem or how to fix?

p.s just opened a discussion here https://github.com/orgs/vercel/discussions/5182

Hi!
I guess that you have already tried the method below, but as far as I know, the following methods may be able to cure the problem.

Could you find geoip-country.dat any place?
If you find it at /var/task/aaa/node_modules/geoip-country/data/geoip-country.dat,
please set environment GEODATADIR=/var/task/aaa/node_modules/geoip-country/data.

If you have any updates, please reopen this issue.