ip2location / ip2location-nodejs

IP2Location Node.js Module - Knowing where your visitors from.

Home Page:http://www.ip2location.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module not found: Can't resolve 'fs'

kenshinman opened this issue · comments

Hi, I'm trying to use this package and got this error

Module not found: Can't resolve 'fs'

How can I resolve this? Thanks.

My code

var ip2loc = require("ip2location-nodejs");
ip2loc.IP2Location_init("./IP2LOCATION-LITE-DB1.BIN");

const ip2location = (ipAddress) => {
	const result = ip2loc.IP2Location_get_all(ipAddress);
	console.log(result);
	return result;
};

module.exports = ip2location

Thanks

Can you try some of the steps mentioned in the link below if it applies to you case?

https://stackoverflow.com/questions/57161839/module-not-found-error-cant-resolve-fs-in