phosphor-icons / react

A flexible icon family for React
https://phosphoricons.com
MIT License
1.1k stars 57 forks source link

Could not find a declaration file when using SSR #68

Closed andresilva-cc closed 11 months ago

andresilva-cc commented 1 year ago

When trying to import from @phosphor-icons/react/dist/ssr, I get the following error:

Could not find a declaration file for module '@phosphor-icons/react/dist/ssr'. '<redacted>/node_modules/@phosphor-icons/react/dist/ssr/index.mjs' implicitly has an 'any' type.
  There are types at '<redacted>/node_modules/@phosphor-icons/react/dist/ssr/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@phosphor-icons/react' library may need to update its package.json or typings.ts(7016)

Found this issue: https://github.com/microsoft/TypeScript/issues/52363 Seems to be something introduced in TypeScript 5.0 that package maintainers need to update. I am using TypeScript 5.2.2.

Can anyone confirm this?

andresilva-cc commented 1 year ago

Changing the import to @phosphor-icons/react/dist/ssr/index works.

rektdeckard commented 11 months ago

This is now fixed with #71. v2.0.14