kevmo314 / browser-geo-tz

A browser module to find the timezone based on gps coordinates
https://kevmo314.github.io/browser-geo-tz/
MIT License
19 stars 4 forks source link

Module not found #9

Open nata-pavliuk opened 5 days ago

nata-pavliuk commented 5 days ago

Hi, @kevmo314 I still have an issue. I can identify the correct function in the codebase. But have an issue in the browser

Screenshot 2024-11-28 at 14 49 01 Screenshot 2024-11-28 at 14 46 27
kevmo314 commented 5 days ago

Could you try https://github.com/kevmo314/browser-geo-tz/commit/bb3c58f02b57ca5079a44156226598442ea9b389 released in 0.1.2? If it does not work, can you provide more concrete steps to reproduction? That commit works for me in building a typescript project.

r-r-lima commented 1 day ago

Hi, I'm having a similar issue, in my case during build/resolve. Replicated using the latest version provided by that commit you mentioned. Using vite v5.4.11

Failed to resolve entry for package "browser-geo-tz". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]

r-r-lima commented 1 day ago

In the end I went and imported "find" directly from browser-geo-tz/src/find: import { find } from "browser-geo-tz/src/find"; That way vite managed to resolve and runs fine in the browser. Maybe it got confused since the package doesn't ship with an "index.js", dunno. Anyway I hope this helps.