derrickreimer / fathom-client

A Fathom Analytics library to help with client-side routing
http://npm.im/fathom-client
MIT License
177 stars 18 forks source link

"Could not find a declaration file for module 'fathom-client'" #62

Closed evadecker closed 3 months ago

evadecker commented 3 months ago

Hi!

As of v3.7.0, fathom-client has started throwing an error in TypeScript. This seems like it was partially resolved in #61 but I'm still encountering a blocking error.

On v3.7.1 today:

Could not find a declaration file for module 'fathom-client'. '/Users/Eva/Sites/namesake.fyi/node_modules/.pnpm/fathom-client@3.7.1/node_modules/fathom-client/dist/fathom-client.esm.js' implicitly has an 'any' type.

There are types at '/Users/Eva/Sites/namesake.fyi/node_modules/fathom-client/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'fathom-client' library may need to update its package.json or typings.

This error is not present in v3.6.0.

I'm using pnpm and the script is being loaded as a module within Astro.

derrickreimer commented 3 months ago

Oh joy. Could you try pointing your dependencies to git://github.com/derrickreimer/fathom-client.git#d4bf37b to see if that resolves it in your environment?

derrickreimer commented 3 months ago

Released 3.7.2. We are now all green on https://arethetypeswrong.github.io/, so I'm pretty confident this should be good shape in most (all?) environments now. Please do let me know if you run into trouble again!

evadecker commented 3 months ago

Confirm that 3.7.2 fixes the issue! Thank you for the incredibly speedy fix!