Upgrade Package Managers
Are you using a package manager like
npm
oryarn
to handle your Font Awesome assets? Here are some handy tips for upgrading your project to Font Awesome Version 7.
Using npm-check-updates
Section titled “Using npm-check-updates”For a nice upgrade experience we recommend using npm-check-updates.
npx npm-check-updates --filter "/@fortawesome.*/" --target greatest --upgrade
// or this for Kit packagesnpx npm-check-updates --filter "/@awesome.me.*/" --target greatest --upgrade
Using npm
Section titled “Using npm”If you prefer to use plain vanilla npm, you can run the built in npm update
command from the directory where your package.json
file lives.
// Use this to update all packages with pending updates (which will include Font Awesome)npm update
// Or you can just update your Font Awesome packages// Update a Kit package - be sure to replace [KitID] with your Kit's IDnpm update '@awesome.me/kit-[KitID]'
// Update SVG core + specific styles - edit or add the styles you use in your projectnpm update @fortawesome/fontawesome-svg-corenpm update @fortawesome/pro-solid-svg-iconsnpm update @fortawesome/sharp-light-svg-iconsnpm update @fortawesome/sharp-duotone-solid-svg-icons...
// Update the Free packagenpm update @fortawesome/fontawesome-free
// Update the Pro packagenpm update @fortawesome/fontawesome-pro
For more information on updating a package using npm check out the official docs.
Using Yarn
Section titled “Using Yarn”Yarn has the yarn up
command for updating your packages.
// Use this to update all packages with pending updates (which will include Font Awesome)yarn up
// Or you can just update your Font Awesome packages// Update a Kit package - be sure to replace [KitID] with your Kit's IDyarn up '@awesome.me/kit-[KitID]'
// Update SVG core + specific styles - edit or add the styles you use in your projectyarn up @fortawesome/fontawesome-svg-coreyarn up @fortawesome/pro-solid-svg-iconsyarn up @fortawesome/sharp-light-svg-iconsyarn up @fortawesome/sharp-duotone-solid-svg-icons...
// Update the Free packageyarn up @fortawesome/fontawesome-free
// Update the Pro packageyarn up @fortawesome/fontawesome-pro
Check out the official Yarn documentation for more information about upgrading your files.
You're all set!
Your project will now load Version 7 and render any existing icons using our newest and freshest icons and options. Are you running into trouble? Check out our troubleshooting guide for answers to common questions about using Font Awesome on the Web.