rpitv / glimpse

Monorepo for the RPI TV Glimpse project
MIT License
3 stars 1 forks source link

External contributors cannot install packages without our FontAwesome Pro key #74

Open robere2 opened 3 months ago

robere2 commented 3 months ago

Describe the bug If a user attempts to run npm i in the root directory or /apps/ui directory, the installation will fail due to being unable to find the FontAwesome Pro icons packages. This is because they're stored in another package registry that requires a Pro key.

To Reproduce Steps to reproduce the behavior:

  1. Make sure you have no .npmrc file containing the FontAwesome registry information
  2. Run npm i in the root of the project

Expected behavior Installation should complete, and when the packages should only be imported if they are present. If using a Pro icon without Pro icons installed, the icon simply won't be visible on your device. It will still be visible on deployment.

Additional context This may require dynamic imports, which may be a problem for tree shaking. FontAwesome is a large set of libraries (62MB for all of them currently installed). It is our largest dependency for the UI. Tree shaking may not be as critical if we have SSR, however I'm not quite sure how that works.

A temporary workaround is to remove the packages from the package.json, but this only works if they are not running the UI.

robere2 commented 3 months ago

https://fontawesome.com/support#can-i-use-in-open-source-projects