Frontity Docs
  • ยป Welcome to Frontity
  • ๐Ÿš€Getting started
    • Quick start guide
  • ๐Ÿ“ƒAbout Frontity
    • Frontity features
    • Browser support
    • Get involved
  • ๐Ÿ“šCore Concepts
    • 1. Project
    • 2. Settings
    • 3. Packages
    • 4. Roots
    • 5. State
    • 6. Actions
    • 7. Libraries
    • 8. Namespaces
    • 9. Styles
  • ๐Ÿ—๏ธArchitecture
    • Decoupled Mode
    • Embedded Mode
  • ๐ŸŒŽDeployment
    • Deploy Frontity using Vercel
    • Deploy Frontity on Layer0
    • Deploy Frontity on Heroku
  • ๐ŸŒ—Isomorphic React
  • โšก๏ธ Perfomance
    • Caching
    • Link prefetching
    • Lazy Loading
    • Code Splitting
  • ๐Ÿ”ŽSEO
  • ๐Ÿ“–Guides
    • Setting the URL of the WordPress data source
    • Using Environment Variables in a Frontity project
    • WordPress requirements for Frontity
    • URLs in a Migration from WordPress to Frontity Decoupled Mode
    • Frontity Query Options
    • Redirections with Frontity
    • Understanding a Frontity project
    • Add a new Frontity package or theme to your project
    • How to share your Frontity project
    • Understanding Mars Theme
    • Working with processors
    • How to process page-builder content in Frontity
    • Keep Frontity Updated
    • Troubleshooting
    • JavaScript
    • React
  • ๐Ÿ‘Contributing
    • How to contribute?
    • Contributing Guide
Powered by GitBook
On this page
  • Update project dependencies
  • Update local package dependencies
  • Troubleshooting
  • Delete all the dependencies and start over

Was this helpful?

  1. Guides

Keep Frontity Updated

PreviousHow to process page-builder content in FrontityNextTroubleshooting

Last updated 4 years ago

Was this helpful?

As in most projects, keeping Frontity and its packages updated is always a good practice. Not only you could use new features added, but also some security issues are usually detected and solved during these updates.

At this point, it is important to distinguish between your dependencies (npm packages you won't modify and reside in /node_modules folder) and your local packages (packages you create or change at your will, and reside in /packages folder). For more info you can check the page .

Update project dependencies

Essential packages such as frontity, @frontity/core or @frontity/tiny-router, and all your dependencies, are included in this part. These can be treated as common npm packages, so you can use the following command to update your package.json to the latest versions:

npx npm-check-updates -u -t minor
npm install

Note that using the -t minor switch ensures that only minor updates will be applied. This avoids introducing potential breaking changes that a major update might introduce. for more info.

With this, you will update your package.json and all your dependencies in node_modules, including the Frontity packages installed in node_modules.

If you want to update just one package you can do it with this other command:

npm install my-package@latest

Update local package dependencies

These local packages, included in packages folder, are supposed to be modified by the users, so any dependency won't be updated when you update your project dependencies.

To update the dependencies of your local package dependencies, go to their folder and run the same command:

cd package/my-local-package
npx npm-check-updates -u -t minor
# DO NOT RUN "npm install" this time!

Do that for each local package found in your packages folder.

After you've finished, go to the root folder of your Frontity project and run npm install there:

cd ../.. # Go back to the root folder
npm install

Troubleshooting

Delete all the dependencies and start over

If you are having problems, follow these steps to install everything from scratch:

  1. Make sure you have updated all your dependencies in:

    • The root package.json of your project.

    • All the package.json files of your local packages.

  2. Delete all the node_modules folders of:

    • The root of your project.

    • All your local packages.

  3. Delete all the package-lock.json file of:

    • The root of your project.

    • All your local packages.

  4. Run npm install again.

Everything should work after this.

Still have questions? Ask ! We are here to help ๐Ÿ˜Š

๐Ÿ“–
Learning Frontity - Packages
See here
the community