FortAwesome / react-fontawesome

Font Awesome React component
https://fontawesome.com
MIT License
3.67k stars 262 forks source link

Module not found: Error: Can't resolve '@fortawesome/pro-solid-svg-icons/faLock' in .... #522

Open barrychapman opened 2 years ago

barrychapman commented 2 years ago

Describe the bug Cannot import an icon:

Starting the development server...
WebpackDevServerUtils.js:185Failed to compile.
WebpackDevServerUtils.js:186Module not found: Error: Can't resolve '@fortawesome/pro-solid-svg-icons/faLock' in 'D:\Projects\ZEVSociety\src\webapp\src\layouts\authentication\sign-in\illustration'
setupHooks.js:195assets by info 18.1 MiB [immutable]
  assets by path static/media/*.jpg 14.5 MiB 28 assets
  assets by path static/media/*.jpeg 2.53 MiB 26 assets
  assets by path static/media/*.png 1.05 MiB

Reproducible test case

            <FontAwesomeIcon icon={solid('lock')} /> log in

Expected behavior import icon as expected

Desktop (please complete the following information):

Additional context did a delete of yarn.lock and reran install