Module not found: Can't resolve 'fs'
kenshinman opened this issue · comments
Kehinde Orilogbon commented
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
IP2Location commented
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