astro-cookieconsent icon indicating copy to clipboard operation
astro-cookieconsent copied to clipboard

Could not find a declaration file for module '@jop-software/astro-cookieconsent'

Open bennycode opened this issue 1 year ago • 0 comments

I added this line to my astro.config.ts file:

import cookieconsent from "@jop-software/astro-cookieconsent";

It shows me this:

Could not find a declaration file for module '@jop-software/astro-cookieconsent'. '/home/bennycode/dev/bennycode/typescript4free/node_modules/@jop-software/astro-cookieconsent/dist/astro-cookieconsent.es.js' implicitly has an 'any' type.

There are types at '/home/bennycode/dev/bennycode/typescript4free/node_modules/@jop-software/astro-cookieconsent/dist/main.d.ts', but this result could not be resolved when respecting package.json "exports". The '@jop-software/astro-cookieconsent' library may need to update its package.json or typings.

There seems to be an issue along these lines:

  • https://github.com/jop-software/astro-cookieconsent/blob/main/package.json#L26-L31

Here is a report about the wrong types:

  • https://arethetypeswrong.github.io/?p=%40jop-software%2Fastro-cookieconsent%403.0.0

A typesVersions entry in the package.json file could probably resolve it:

  • https://stackoverflow.com/a/69791012/451634

Best, Benny

bennycode avatar Jul 27 '24 08:07 bennycode