I'd been fighting this issue on my own package for the last few days:
Could not find a declaration file for module 'contrastrast'. '/home/Development/bookthing.nuxt/node_modules/.pnpm/contrastrast@0.1.1/node_modules/contrastrast/dist/contrastrast.js' implicitly has an 'any' type.
There are types at '/home/Development/bookthing.nuxt/node_modules/contrastrast/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'contrastrast' library may need to update its package.json or typings.
After lots of searching, I think I've settled on a solution that works for me at least in the short term.