1. Sitecore JavaScript Services SDKs (JSS) 22.x

Upgrade JSS 22.8 Next.js apps to version 22.9

Version:

This topic covers most of the changes you must make to your existing JSS 22.8 applications to take advantage of the new features in version 22.9. However, because of the nature of JavaScript and Next.js application development, this topic doesn't account for all the customization you might have in your existing application.

While upgrading, consider the JSS templates and add-ons you used when creating your Next.js application. You can find them in your package.json file. For example, a JSS 22.8 application included in the XM Cloud starter foundation uses the following templates and add-ons:

  • nextjs

  • nextjs-styleguide

  • nextjs-sxa

  • nextjs-multisite

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

Before you begin
  • If you haven't already done so, upgrade your app to JSS 22.8.

  • Familiarize yourself with the changelog. If your application is heavily customized, the changelog can provide guidance on what additional changes you need that are not covered in this topic.

Update application dependencies in your existing app

For your upgraded application to work correctly, you will need to update dependencies.

To update your dependencies:

  1. In your existing application's package.json file

    • Update every @sitecore-jss package to version ~22.9.0.

    • Update the following dependencies to the specified versions:

      "next": "^15.4.6",
      "sharp": "0.34.3",
      ...
      "@sitecore-cloudsdk/core": "^0.5.2",
      "@sitecore-cloudsdk/events": "^0.5.2",
      "@sitecore-feaas/clientside": "^0.6.2"
      ....
      "chokidar": "~4.0.3",
      "cross-env": "~10.0.0",
      "@types/react": "^19.1.7",
      "@types/react-dom": "^19.1.7",
      ...
  2. Install the dependencies with the following command:

    npm install

Next steps

To finalize the upgrade process, make sure you resolve any errors and warnings you encounter. Enable debug logging for JSS specific issues to assist you if necessary.

If you have suggestions for improving this article, let us know!