`freeSolidSvgIcons is not defined`
innateessence opened this issue · comments
How to replicate:
yarn add svelte-fa
yarn add @fortawesome/free-brands-svg-icons
Then simply:
<script>
import Fa from 'svelte-fa/src/fa.svelte'
import { faGithub } from '@fortawesome/free-brands-svg-icons'
</script>
<footer>
<div class="foobar">
<div class="icon-container"><Fa icon={faGithub}/></div>
</div>
</footer>
then yarn run build && yarn run serve
output:
freeBrandsSvgIcons imported from external module "@fortawesome/free-brands-svg-icons" but never used in "src/Footer.svelte"
@fortawesome/free-brands-svg-icons (guessing 'freeBrandsSvgIcons')
Upon navigating to the website in question I see this in the console:
Uncaught ReferenceError: freeBrandsSvgIcons is not defined
Is there something I'm doing incorrectly?
This happens regardless of using free-brands-svg-icons or free-solid-svg-icons
Can you use codesandbox or repo to provide a reproducible use case?
interesting.
I could not reproduce the issue on codesandbox and when I deleted the node_modules directory and reinstalled with npm
instead of yarn
it seems that the problem no longer exists on my end.
Odd though since I believe I did that before, but perhaps I forgot to delete the yarn.lock
file after syncing things from one machine to the next.
Either way, it's solved now and seems to be an error on my part. Closing.