Upgrade JSS apps to JSS 22.9
Sitecore JavaScript Rendering SDK version 22.9 requires you to make some modifications to your apps.
-
If you haven't already done so, upgrade your app to JSS 22.8.
-
Familiarize yourself with the JSS 22.9 release notes to ensure you understand the implications of upgrading.
-
To update your JSS Next.js applications, follow the upgrade guide from JSS 22.8 to 22.9 for JSS Next.js apps instead of this topic.
This topic describes how to:
Update Angular app
To update your Angular application:
-
In your existing application's
package.jsonfile:-
Update the following dependencies to the specified versions:
RequestResponse"core-js": "~3.45.0", "graphql": "15.10.1", ... "rxjs": "~7.8.2", "tslib": "^2.8.1", .... "chokidar": "^4.0.3", ... "dotenv": "^17.2.1", "dotenv-webpack": ^8.1.1" ... -
Remove
@types/jasminewd2andprotractordependencies. -
Remove the
e2escript from the scripts section. -
Add the following after
devDependenciessection:RequestResponse"overrides": { "request": { "form-data": "^2.5.5" } }This addresses a vulnerability in one of the
angular-webkitdependencies.
-
-
Delete the
e2efolder from your existing application. -
Update your application's JSS package, and install dependencies.
Update React app
To update your React application:
-
In your existing application's
package.jsonfile:-
Update the following dependencies to the specified versions:
RequestResponse"@apollo/client": "^3.13.9", ... "bootstrap": "^5.3.7", "cross-fetch": "^4.1.0", ... "graphql": "~16.11.0", "i18next": "^22.5.1", ... "serialize-javascript": "^6.0.2" ... "@babel/core": "^7.28.0", "@babel/eslint-parser": "^7.28.0", ... "@babel/preset-env": "^7.28.0", "@babel/preset-react": "^7.27.1", "@babel/register": "~7.27.1", .... "babel-loader": "~10.0.0", ... "cross-env": "~10.0.0", "cross-spawn": "^7.0.6", "del-cli": "^6.0.0", "dotenv": "^17.2.1", ... "express": "^5.1.0", "fs-extra": "^11.3.1", ... "html-loader": "~5.1.0", "http-proxy-middleware": "~3.0.5", ... "webpack": "~5.101.0", "webpack-cli": "~6.0.1" -
Find the following dependencies:
RequestResponse"@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", -
Replace it with the following:
RequestResponse"@babel/plugin-transform-export-namespace-from": "^7.27.1", "@babel/plugin-transform-private-property-in-object": "^7.27.1",
-
-
In
server/server.webpack.config.js, find the following plugins and update their references:Old
New
@babel/plugin-proposal-export-namespace-from@babel/plugin-transform-export-namespace-from@babel/plugin-proposal-private-methods@babel/plugin-transform-private-methods@babel/plugin-proposal-private-property-in-object@babel/plugin-transform-private-property-in-object -
In
src/setupProxy.js, make the following updates to preserve the pre-upgradehttp-proxy-middlewareformat:-
Find the following:
RequestResponseconst { createProxyMiddleware } = require('http-proxy-middleware'); -
Replace it with the following:
RequestResponseconst { legacyCreateProxyMiddleware } = require('http-proxy-middleware'); -
Replace all mentions of
createProxyMiddlewarewithlegacyCreateProxyMiddleware.
-
-
If you have any custom logic that uses
express,http-proxy-middleware,babel-loader, or other dependencies mentioned in this guide, please refer to their corresponding guides: -
Update your application's JSS package, and install dependencies.
Update the Node headless SSR Experience Edge app
To update your Node headless SSR Experience Edge app:
-
In your existing application's
package.jsonfile, update the following dependencies to the specified versions:RequestResponse"express": "~5.1.0", "dotenv": "^17.2.1" .... "@types/compression": "^1.8.1", "@types/express": "^5.0.3", ... "typescript": "~5.9.2" ... -
Update your application's JSS package, and install dependencies.
Update the Node headless SSR proxy app
To update your Node headless SSR proxy app:
-
In your existing application's
package.jsonfile, update the following dependencies to the specified versions:RequestResponse"agentkeepalive": "^4.6.0", ... "express": "~5.1.0", "dotenv": "^17.2.1" .... "@types/compression": "^1.8.1", "@types/express": "^5.0.3", ... "typescript": "~5.9.2" ... -
In
src/index.ts:-
Find the following:
RequestResponseserver.use( '*', headlessProxy.middleware( config.serverBundle.renderView, config, config.serverBundle.parseRouteUrl ) ); -
Replace it with the following:
RequestResponseserver.use( '/{*splat}', headlessProxy.middleware( config.serverBundle.renderView, config, config.serverBundle.parseRouteUrl ) );
-
-
If you have custom logic in your proxy app that uses
express, see Moving to Express 5. -
Update your application's JSS package, and install dependencies.
Update application dependencies
For your upgraded applications to work correctly, you must update JSS dependencies.
To update your JSS dependencies:
-
In your existing application's
package.jsonfile, update every@sitecore-jsspackage to version~22.9.0. -
Install the dependencies with the following command:
RequestResponsenpm install