Definitive guide for developers: SharePoint Framework for SharePoint Server 2016
These days, all of Microsoft's updates about the SPFx, or community content have one thing in common: they ignore SharePoint Server 2016. Not this post!
by Andrew Connell
Last updated September 21, 2024
Overview
Microsoft’s updates about the SharePoint Framework, as well as articles, blog posts, and videos from the community showing off their projects all have one thing in common: they overwhelmingly focus on SharePoint Online & ignore SharePoint Server.
Customers who’re using the SharePoint Framework (SPFx) on SharePoint Server deployments, also known as SharePoint on-premises, never see new features or capabilities for their environments. Sure… you get it; Microsoft isn’t updating the SPFx for SharePoint Server from what’s already provided.
But as the SPFx keeps evolving and the tools keep updating, it’s hard to keep track of what is or isn’t supported on-premises.
In this post, my goal is to provide the definitive guide to the SharePoint Framework for SharePoint Server 2016 on-premises deployments.
Universal truths for SPFx solutions on all SharePoint Server (on-premises) deployments
Before we look at the specifics of SharePoint Server 2016 with Feature Pack 2, I want to cover some universal truths that apply to all versions of SharePoint Server with respect to the SPFx.
Setup & configure SharePoint Server to host apps
The SPFx relies on the existing support SharePoint has for apps. Much of the investments Microsoft made in SharePoint Server 2013 to support the add-in model, originally called the app model, are used to deploy SPFx solutions. Most notably is the tenant app catalog.
Use the following links to ensure your SharePoint Server is configured to host apps. This is a required prerequisite for deploy SPFx solutions to your on-prem SharePoint Server deployments. This requirement applies to SharePoint Server 2016 with Feature Pack 2, SharePoint Server 2019, & SharePoint Server Subscription Edition (SE).
- Microsoft: Install and manage apps for SharePoint Server
- Microsoft: Configure an environment for apps for SharePoint Server
- Microsoft: Manage the App Catalog in SharePoint Server
Microsoft has no plans to update SPFx for SharePoint Server
Microsoft has no plans to update the SPFx deployments on SharePoint Server.
If there’s a bug in one version that’s fixed in a later version of SPFx, Microsoft doesn’t plan to retroactively jump back and fix SPFx. For example, known bugs in SPFx v1.4.1 that were fixed in a later version won’t make it to SharePoint Server deployments.
Notable SPFx capabilities available in SharePoint Server 2016
The following native SPFx capabilities are supported are available in SharePoint Server 2016 deployments:
Notable SPFx omissions from SharePoint Server 2016
Unfortunately, because the latest version of the SPFx that’s supported is v1.1.0, you’re missing out on a lot of functionality. SPFx v1.1.0 was released on June 16, 2017 and Microsoft has added a lot of capabilities to SPFx since that time.
Things you’ll miss out on include:
SPFx development environment (including versions)
Now that you know what you can and can’t do with SPFx in SharePoint Server 2016, let’s look at what you need to set up your developer environment so you can start creating custom solutions!
What you need:
Let’s start with what you need. Microsoft says you can develop SPFx solutions on any platform, including:
- Windows
- macOS
- Linux
Node.js LTS v6: At a minimum, you need Node.js LTS v6, also known as Boron.
Gulp: install the Gulp CLI globally, not gulp.
npm install gulp-cli --globalYeoman generator for the SharePoint Framework: you need the version of the SPFx generator that can create v1.1.0 projects:
npm install @microsoft/generator-sharepoint@1.1.0 --globalYeoman: To run the generator, you need Yeoman. Specifically, you need Yeoman v2.0.0:
npm install yo@2.0.0 --globalFixup Yeoman: Unfortunately there’s an issue you need to resolve after installing Yeoman.
- Install yeoman-environment v2.7.0 globally:
npm install yeoman-environment@2.7.0 --global
- Find where the Yeoman installed version is located. You can use either the
whichcommand on macOS orwhereon Windows to get this:
# macOS
➜ which yo
/Users/ac/.nvm/versions/node/v6.17.1/bin/yo
# Windows
c:\users\ac>where /R c:\ yo
c:\users\ac\AppData\Roaming\nvm\v6.17.1\yo
- Delete the folder yeoman-environment from the installed dependencies.
This way, you’re using the most recent versions of Node.js, Gulp-cli, Yeoman & the generator SPFx to create new SPFx v1.1.0 projects for SharePoint Server 2016 & be ready to run them straight away without having to jump through hoops after creating the project.
My dev environment recommendation for SharePoint Server 2016 with Feature Pack 2
- Node.js LTS v6 (specifically, Node.js v6.17.1)
- npm v4
- Gulp-CLI v2.3.0
- Yeoman v2.0.0 with the Yeoman-environment v2.7.0 fix we mentioned above
- Yeoman generator for the SharePoint Framework v1.6.0
npm install npm@4 --global
npm install gulp-cli@2.3.0 yo@2.0.0 @microsoft/generator-sharepoint@1.6.0 --global
# +++++ fix the yeoman-environment version problem +++++
# 1. install yeoman-environment v2.7.0
npm install yeoman-environment@2.7.0 --global
# 2. delete existing yeoman-environment installed by yo
# delete ./PATH_TO_YOUR_GLOBALLY_INSTALLED_PACKAGES/yo/node_modules/yeoman-environment
This way, you’re using the most recent versions of Node.js, Gulp-cli, Yeoman & the generator SPFx to create new SPFx v1.1.0 projects for SharePoint Server 2016 & be ready to run them straight away without having to jump through hoops after creating the project.