Date: 2/28/2026
Following is the list of steps required to upgrade your project to SharePoint Framework version 1.22.2. Summary of the modifications is included at the end of the report.
Upgrade SharePoint Framework dependency package @microsoft/sp-core-library
Execute the following command:
npm i -SE @microsoft/sp-core-library@1.22.2File: ./package.json:48:5
Upgrade SharePoint Framework dependency package @microsoft/sp-lodash-subset
Execute the following command:
npm i -SE @microsoft/sp-lodash-subset@1.22.2File: ./package.json:54:5
Upgrade SharePoint Framework dependency package @microsoft/sp-office-ui-fabric-core
Execute the following command:
npm i -SE @microsoft/sp-office-ui-fabric-core@1.22.2File: ./package.json:55:5
Upgrade SharePoint Framework dependency package @microsoft/sp-webpart-base
Execute the following command:
npm i -SE @microsoft/sp-webpart-base@1.22.2File: ./package.json:58:5
Upgrade SharePoint Framework dependency package @microsoft/sp-dialog
Execute the following command:
npm i -SE @microsoft/sp-dialog@1.22.2File: ./package.json:49:5
Upgrade SharePoint Framework dependency package @microsoft/sp-application-base
Execute the following command:
npm i -SE @microsoft/sp-application-base@1.22.2File: ./package.json:46:5
Upgrade SharePoint Framework dependency package @microsoft/sp-listview-extensibility
Execute the following command:
npm i -SE @microsoft/sp-listview-extensibility@1.22.2File: ./package.json:52:5
Upgrade SharePoint Framework dependency package @microsoft/sp-property-pane
Execute the following command:
npm i -SE @microsoft/sp-property-pane@1.22.2File: ./package.json:57:5
Upgrade SharePoint Framework dependency package @microsoft/sp-component-base
Execute the following command:
npm i -SE @microsoft/sp-component-base@1.22.2File: ./package.json:47:5
Upgrade SharePoint Framework dependency package @microsoft/sp-extension-base
Execute the following command:
npm i -SE @microsoft/sp-extension-base@1.22.2File: ./package.json:50:5
Upgrade SharePoint Framework dependency package @microsoft/sp-http
Execute the following command:
npm i -SE @microsoft/sp-http@1.22.2File: ./package.json:51:5
Upgrade SharePoint Framework dependency package @microsoft/sp-loader
Execute the following command:
npm i -SE @microsoft/sp-loader@1.22.2File: ./package.json:53:5
Upgrade SharePoint Framework dependency package @microsoft/sp-page-context
Execute the following command:
npm i -SE @microsoft/sp-page-context@1.22.2File: ./package.json:56:5
Upgrade SharePoint Framework dependency package @microsoft/decorators
Execute the following command:
npm i -SE @microsoft/decorators@1.22.2File: ./package.json:42:5
Upgrade SharePoint Framework dependency package @microsoft/sp-adaptive-card-extension-base
Execute the following command:
npm i -SE @microsoft/sp-adaptive-card-extension-base@1.22.2File: ./package.json:45:5
Upgrade SharePoint Framework dev dependency package @microsoft/sp-module-interfaces
Execute the following command:
npm i -DE @microsoft/sp-module-interfaces@1.22.2File: ./package.json:101:5
Upgrade SharePoint Framework dev dependency package @microsoft/eslint-plugin-spfx
Execute the following command:
npm i -DE @microsoft/eslint-plugin-spfx@1.22.2File: ./package.json:97:5
Upgrade SharePoint Framework dev dependency package @microsoft/eslint-config-spfx
Execute the following command:
npm i -DE @microsoft/eslint-config-spfx@1.22.2File: ./package.json:96:5
Install SharePoint Framework dev dependency package @microsoft/spfx-web-build-rig
Execute the following command:
npm i -DE @microsoft/spfx-web-build-rig@1.22.2File: ./package.json:95:3
Install SharePoint Framework dev dependency package @microsoft/spfx-heft-plugins
Execute the following command:
npm i -DE @microsoft/spfx-heft-plugins@1.22.2File: ./package.json:95:3
Update version in .yo-rc.json
{
"@microsoft/generator-sharepoint": {
"version": "1.22.2"
}
}File: ./.yo-rc.json:3:5
Remove SharePoint Framework dev dependency package @microsoft/sp-build-web
Execute the following command:
npm un -D @microsoft/sp-build-webFile: ./package.json:100:5
Remove SharePoint Framework dev dependency package gulp
Execute the following command:
npm un -D gulpFile: ./package.json:125:5
Remove SharePoint Framework dev dependency package ajv
Execute the following command:
npm un -D ajvFile: ./package.json:118:5
Upgrade SharePoint Framework dev dependency package @rushstack/eslint-config
Execute the following command:
npm i -DE @rushstack/eslint-config@4.5.2File: ./package.json:102:5
Upgrade SharePoint Framework dev dependency package typescript
Execute the following command:
npm i -DE typescript@~5.8.0File: ./package.json:139:5
Remove SharePoint Framework dev dependency package @microsoft/rush-stack-compiler-5.3
Execute the following command:
npm un -D @microsoft/rush-stack-compiler-5.3File: ./package.json:95:22
Install SharePoint Framework dev dependency package @rushstack/heft
Execute the following command:
npm i -DE @rushstack/heft@1.1.2File: ./package.json:95:3
Install SharePoint Framework dev dependency package @typescript-eslint/parser
Execute the following command:
npm i -DE @typescript-eslint/parser@8.46.2File: ./package.json:95:3
Install SharePoint Framework dev dependency package css-loader
Execute the following command:
npm i -DE css-loader@7.1.2File: ./package.json:95:3
Install SharePoint Framework dev dependency package @types/heft-jest
Execute the following command:
npm i -DE @types/heft-jest@1.0.2File: ./package.json:95:3
Update useGulp property in .yo-rc.json
{
"useGulp": false
}File: ./.yo-rc.json:2:38
In the .vscode folder, add the launch.json file
{
"version": "0.2.0",
"configurations": [
{
"name": "Hosted workbench",
"type": "msedge",
"request": "launch",
"url": "https://{tenantDomain}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222",
"-incognito"
]
}
]
}File: .vscode/launch.json
Remove file src/index.ts
Execute the following command:
Remove-Item "src/index.ts"File: src/index.ts
Remove file gulpfile.js
Execute the following command:
Remove-Item "gulpfile.js"File: gulpfile.js
Add file tsconfig.json
Execute the following command:
@'
{
"extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json"
}
'@ | Out-File -FilePath "tsconfig.json"File: tsconfig.json
Add file config/rig.json
Execute the following command:
@'
{
// The "rig.json" file directs tools to look for their config files in an external package.
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@microsoft/spfx-web-build-rig"
}
'@ | Out-File -FilePath "config/rig.json"File: config/rig.json
Add file config/typescript.json
Execute the following command:
@'
{
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
"staticAssetsToCopy": {
"fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],
"includeGlobs": ["webparts/*/loc/*.js"]
}
}
'@ | Out-File -FilePath "config/typescript.json"File: config/typescript.json
Add resolution for package @types/react
{
"resolutions": {
"@types/react": "17.0.45"
}
}File: ./package.json:1:1
Remove package.json property
{
"main": "undefined"
}File: ./package.json:159:3
Update package.json scripts.build property
{
"scripts": {
"build": "heft test --clean --production && heft package-solution --production"
}
}File: ./package.json:9:5
Remove package.json scripts.test property
{
"scripts": {
"test": ""
}
}File: ./package.json:11:5
Update package.json scripts.clean property
{
"scripts": {
"clean": "heft clean"
}
}File: ./package.json:10:5
Update package.json scripts.start property
{
"scripts": {
"start": "heft start --clean"
}
}File: ./package.json:8:14
Update package.json scripts.eject-webpack property
{
"scripts": {
"eject-webpack": "heft eject-webpack"
}
}File: ./package.json:8:14
Update package.json overrides.@rushstack/heft property
{
"overrides": {
"@rushstack/heft": "1.1.2"
}
}File: ./package.json:1:1
To .gitignore add the 'lib-dts' folder
File: ./.gitignore
To .gitignore add the 'lib-commonjs' folder
File: ./.gitignore
To .gitignore add the 'lib-esm' folder
File: ./.gitignore
To .gitignore add the 'jest-output' folder
File: ./.gitignore
Add override rule @rushstack/import-requires-chunk-name in .eslintrc.js
// Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/import-requires-chunk-name': 1,File: .eslintrc.js:21:7
Add override rule @rushstack/pair-react-dom-render-unmount in .eslintrc.js
// Ensure that React components rendered with ReactDOM.render() are unmounted with ReactDOM.unmountComponentAtNode(). https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/pair-react-dom-render-unmount': 1,File: .eslintrc.js:21:7
Remove override rule @microsoft/spfx/import-requires-chunk-name in .eslintrc.js
File: .eslintrc.js:298:9
Remove override rule @microsoft/spfx/pair-react-dom-render-unmount in .eslintrc.js
File: .eslintrc.js:300:9
If, after upgrading npm packages, when building the project you have errors similar to: "error TS2345: Argument of type 'SPHttpClientConfiguration' is not assignable to parameter of type 'SPHttpClientConfiguration'", try running 'npm dedupe' to cleanup npm packages.
Execute the following command:
npm dedupeFile: ./package.json
npm un -D @microsoft/sp-build-web gulp ajv @microsoft/rush-stack-compiler-5.3
npm i -SE @microsoft/sp-core-library@1.22.2 @microsoft/sp-lodash-subset@1.22.2 @microsoft/sp-office-ui-fabric-core@1.22.2 @microsoft/sp-webpart-base@1.22.2 @microsoft/sp-dialog@1.22.2 @microsoft/sp-application-base@1.22.2 @microsoft/sp-listview-extensibility@1.22.2 @microsoft/sp-property-pane@1.22.2 @microsoft/sp-component-base@1.22.2 @microsoft/sp-extension-base@1.22.2 @microsoft/sp-http@1.22.2 @microsoft/sp-loader@1.22.2 @microsoft/sp-page-context@1.22.2 @microsoft/decorators@1.22.2 @microsoft/sp-adaptive-card-extension-base@1.22.2
npm i -DE @microsoft/sp-module-interfaces@1.22.2 @microsoft/eslint-plugin-spfx@1.22.2 @microsoft/eslint-config-spfx@1.22.2 @microsoft/spfx-web-build-rig@1.22.2 @microsoft/spfx-heft-plugins@1.22.2 @rushstack/eslint-config@4.5.2 typescript@~5.8.0 @rushstack/heft@1.1.2 @typescript-eslint/parser@8.46.2 css-loader@7.1.2 @types/heft-jest@1.0.2
npm dedupe
Remove-Item "src/index.ts"
Remove-Item "gulpfile.js"
@'
{
"extends": "./node_modules/@microsoft/spfx-web-build-rig/profiles/default/tsconfig-base.json"
}
'@ | Out-File -FilePath "tsconfig.json"
@'
{
"extends": "@microsoft/spfx-web-build-rig/profiles/default/config/typescript.json",
"staticAssetsToCopy": {
"fileExtensions": [".resx", ".jpg", ".png", ".woff", ".eot", ".ttf", ".svg", ".gif"],
"includeGlobs": ["webparts/*/loc/*.js"]
}
}
'@ | Out-File -FilePath "config/typescript.json"Update version in .yo-rc.json:
{
"@microsoft/generator-sharepoint": {
"version": "1.22.2"
}
}Update useGulp property in .yo-rc.json:
{
"useGulp": false
}In the .vscode folder, add the launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Hosted workbench",
"type": "msedge",
"request": "launch",
"url": "https://{tenantDomain}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222",
"-incognito"
]
}
]
}Add resolution for package @types/react:
{
"resolutions": {
"@types/react": "17.0.45"
}
}Remove package.json property:
{
"main": "undefined"
}Update package.json scripts.build property:
{
"scripts": {
"build": "heft test --clean --production && heft package-solution --production"
}
}Remove package.json scripts.test property:
{
"scripts": {
"test": ""
}
}Update package.json scripts.clean property:
{
"scripts": {
"clean": "heft clean"
}
}Update package.json scripts.start property:
{
"scripts": {
"start": "heft start --clean"
}
}Update package.json scripts.eject-webpack property:
{
"scripts": {
"eject-webpack": "heft eject-webpack"
}
}Update package.json overrides.@rushstack/heft property:
{
"overrides": {
"@rushstack/heft": "1.1.2"
}
}To .gitignore add the 'lib-dts' folder:
lib-dts
To .gitignore add the 'lib-commonjs' folder:
lib-commonjs
To .gitignore add the 'lib-esm' folder:
lib-esm
To .gitignore add the 'jest-output' folder:
jest-output
Add override rule @rushstack/import-requires-chunk-name in .eslintrc.js:
// Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/import-requires-chunk-name': 1,Add override rule @rushstack/pair-react-dom-render-unmount in .eslintrc.js:
// Ensure that React components rendered with ReactDOM.render() are unmounted with ReactDOM.unmountComponentAtNode(). https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/pair-react-dom-render-unmount': 1,Remove override rule @microsoft/spfx/import-requires-chunk-name in .eslintrc.js:
Remove override rule @microsoft/spfx/pair-react-dom-render-unmount in .eslintrc.js: