Below is a table listing key SPFx versions, their compatibility context (primarily Node.js and general toolchain), and the npm/global commands to install/upgrade them.


SPFx Compatibility & Install Commands

Below is a table listing key SPFx versions, their compatibility context (primarily Node.js and general toolchain), and the npm/global commands to install/upgrade them.

SPFx VersionCompatibility Notes (Node.js / Toolchain)Install / Upgrade Commands
v1.14Supports Node.js LTS v12 or v14. (GitHub)bash npm install @microsoft/generator-sharepoint@1.14 -g For project upgrade: npm uninstall @microsoft/{spfx-package}@<oldVersion> npm install @microsoft/{spfx-package}@1.14 --save --save-exact (Microsoft Learn)
v1.15Supports Node.js LTS v14 or v16. (GitHub)Global generator: npm install @microsoft/generator-sharepoint@1.15 -g Upgrade packages to 1.15: npm install @microsoft/sp-core-library@1.15 --save --save-exact etc.
v1.16Node.js v16.13+ recommended. (Microsoft Learn)npm install @microsoft/generator-sharepoint@1.16 -g Upgrade: npm uninstall @microsoft/{spfx-package}@1.15.2 npm install @microsoft/{spfx-package}@1.16 --save --save-exact (Microsoft Learn)
v1.17Node.js v16.13+; newer toolchain alignments. (Techrobbers)npm install @microsoft/generator-sharepoint@1.17 -g In project: npm install @microsoft/sp-core-library@1.17 --save --save-exact
v1.18Supports Node.js LTS v16 or v18. (GitHub)npm install @microsoft/generator-sharepoint@1.18 -g Then update each SPFx package: npm install @microsoft/sp-webpart-base@1.18 --save --save-exact
v1.19Node.js v18 recommended. (Techrobbers)npm install @microsoft/generator-sharepoint@1.19 -g Project update: npm install @microsoft/sp-core-library@1.19 --save --save-exact
v1.20Node.js v18.x (and some support for Node v16.x depending on patch). (Torpedo)Global install: npm install @microsoft/generator-sharepoint@1.20 -g Upgrade project: npm uninstall @microsoft/{spfx-package}@<oldVersion> npm install @microsoft/{spfx-package}@1.20 --save --save-exact (Microsoft Learn)
v1.21Node.js v22 only; TypeScript 5.x. (Microsoft Learn)npm install @microsoft/generator-sharepoint@1.21 -g Update: npm install @microsoft/sp-core-library@1.21 --save --save-exact

Notes & Tips

  • When you update the global SPFx generator (via @microsoft/generator-sharepoint), you ensure that when you scaffold new projects they use the correct version baseline.
  • For existing projects you must update the individual packages (like @microsoft/sp-core-library, @microsoft/sp-webpart-base, etc) in package.json and reinstall with the --save-exact flag to lock the version.
  • Use a version manager (like nvm, nvs) to switch Node.js versions if you have multiple SPFx projects targeting different versions. (PNP GitHub)
  • Always consult the official compatibility page: “SharePoint Framework development tools and libraries compatibility”. (Microsoft Learn)
Edvaldo Guimrães Filho Avatar

Published by