FortAwesome / angular-fontawesome

Official Angular component for Font Awesome 5+
https://fontawesome.com
MIT License
1.49k stars 152 forks source link

@fortawesome/angular-fontawesome imports symbols from @fortawesome/fontawesome-common-types, but doesn’t depend on it. #412

Closed mwaibel-go closed 1 year ago

mwaibel-go commented 1 year ago

Describe the problem

When compiling my application, I get this error:

Error: node_modules/@fortawesome/angular-fontawesome/config.d.ts:1:44 - error TS2307: Cannot find module '@fortawesome/fontawesome-common-types' or its corresponding type declarations.

1 import { IconDefinition, IconPrefix } from '@fortawesome/fontawesome-common-types';
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What did you expect?

No compilation error; or @fortawsome/angular-fontawesome listing @fortawesome/fontawesome-common-types as peer dependency.

Reproducible test case

https://stackblitz.com/edit/angular-ivy-y53r3l?file=package.json

I bumped the versions of @fortawesome/angular-fontawesome and @fortawesome/fontawesome-svg-core to 6.4.2 and removed the ‘regular’ and ‘brands’ icon packages

mwaibel-go commented 1 year ago

Close because I didn’t pay attention and the repro doesn’t actually reproduce the issue.

Nosfistis commented 11 months ago

This still happens. When using npm workspaces, I use npm install --install-strategy=nested so that each workspace's dependencies are placed in the same level as the workspace. This causes npm to place fontawesome-common-types under fontawesome-svg-code only.

mwaibel-go commented 11 months ago

@Nosfistis I suggest you open a new issue with a repro to get clear of my noise