phosphor-icons / react

A flexible icon family for React

Home Page:https://phosphoricons.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find a declaration file when using SSR

andresilva-cc opened this issue · comments

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: microsoft/TypeScript#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?

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

This is now fixed with #71. v2.0.14