Skip to content

Commit 8d250b0

Browse files
Merge pull request SharePoint#8820 from nimishasatapathy/nimishasatapathy-test-sharepoint-framework-article
Updated-SharePoint Framework development with SharePoint Server 2019 …
2 parents 9a5ba8a + 9e0790c commit 8d250b0

7 files changed

+124
-86
lines changed

.openpublishing.redirection.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@
9494
"source_path": "docs/spfx/web-parts/get-started/office-addins-tutorial.md",
9595
"redirect_url": "docs/spfx/release-1.14.md",
9696
"redirect_document_id": false
97-
}
97+
},
98+
{
99+
"source_path": "docs/spfx/sharepoint-2019-support.md",
100+
"redirect_url": "docs/spfx/sharepoint-2019-and-subscription-edition-support.md",
101+
"redirect_document_id": false
102+
},
103+
98104
]
105+
99106
}

docs/spfx/compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SharePoint Online always uses the latest version of the SharePoint Framework, bu
2424
For more information about SharePoint Framework development with SharePoint 2016 Feature Pack 2 and SharePoint 2019, see:
2525

2626
- [SharePoint Framework development with SharePoint 2016 Feature Pack 2](sharepoint-2016-support.md)
27-
- [SharePoint Framework development with SharePoint Server 2019](sharepoint-2019-support.md) - this guidance applies also for SharePoint Server Subscription Edition
27+
- [SharePoint Framework development with SharePoint Server 2019 and Subscription Edition](sharepoint-2019-and-subscription-edition-support.md) - this guidance applies also for SharePoint Server Subscription Edition
2828

2929
## SPFx development environment compatibility
3030

docs/spfx/set-up-your-development-environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,4 @@ If your development environment is behind a corporate proxy, you need to configu
188188

189189
- [SharePoint Framework development tools and libraries compatibility](compatibility.md)
190190
- [SharePoint Framework development with SharePoint Server 2016 Feature Pack 2](sharepoint-2016-support.md)
191-
- [SharePoint Framework development with SharePoint Server 2019](sharepoint-2019-support.md)
191+
- [SharePoint Framework development with SharePoint Server 2019 and Subscription Edition](sharepoint-2019-and-subscription-edition-support.md)
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: SharePoint Framework development with SharePoint Server 2019 and Subscription Edition
3+
4+
description: SharePoint Server 2019 & Subscription Edition (SE) supports SharePoint Framework client-side web parts in classic and modern pages, and extensions in modern pages.
5+
ms.date: 03/22/2023
6+
ms.localizationpriority: high
7+
---
8+
9+
# SharePoint Framework development with SharePoint Server 2019 and Subscription Edition
10+
11+
SharePoint Server 2019 and Subscription Edition support SharePoint Framework client-side web parts in classic and modern pages, and extensions in modern pages.
12+
13+
> [!IMPORTANT]
14+
> SharePoint Server Subscription Edition (SE) has all the same dependencies and requirements for the SharePoint Framework as SharePoint Server 2019.
15+
16+
17+
## Which version of the SharePoint Framework to use
18+
19+
Because SharePoint Online and SharePoint Server 2019 have different release cycles for new capabilities, they also have different capabilities when it comes to the SharePoint Framework. SharePoint Online always uses the latest version of the SharePoint Framework, but SharePoint Server 2019 only supports the version that matches the server-side dependencies of the deployed packages.
20+
21+
> [!IMPORTANT]
22+
> SharePoint Server 2019 supports SharePoint Framework client-side web parts hosted on classic or modern SharePoint pages built by using the SharePoint Framework v1.4.1.
23+
24+
SharePoint Server 2019 also supports SharePoint Framework extensions hosted on modern SharePoint pages built using SharePoint Framework v1.4.1. This means that when you're targeting the SharePoint Server 2019 platform, you need to use the SharePoint Framework v1.4.1 because of the server-side version dependencies.
25+
26+
Starting from v1.3, the SharePoint Framework Yeoman generator supports scaffolding solutions that use both the latest version of the SharePoint Framework meant for use with SharePoint Online, and solutions that can be used with SharePoint on-premises based on the v1.1.0 or v1.4.1 of the SharePoint Framework. You don't need to install a separate version of the SharePoint Framework Yeoman generator to scaffold solutions meant for use with SharePoint on-premises.
27+
28+
## Development environment considerations
29+
30+
When you're developing SharePoint Framework client-side web parts, you need Internet connectivity to access npm packages. This is required when solutions are being scaffolded by using the SharePoint Framework Yeoman templates.
31+
32+
If Internet access isn't available for the development machines, you can set up a local on-premises registry for the required npm packages. However, this requires more software and a significant amount of work to set up and maintain local package versions with packages in the actual npm gallery.
33+
34+
The [Team-based development on the SharePoint Framework](team-based-development-on-sharepoint-framework.md) guidance document includes different options for development environment setup including when you might need to support multiple SharePoint Framework versions.
35+
36+
### Node.js, gulp-cli, and Yeoman versions
37+
38+
The dependencies for SPFx v1.4.1 frameworks, tools, and the associated versions don't match the same dependency matrix for the latest versions of SharePoint Framework. In these cases, you may need to install specific versions of the tools. Because SPFx v1.4.1 is supported on Node.js v6 and Node.js v8 by default, you need to ensure you have a supported version of Node.js installed as well as an older version of Gulp CLI and Yeoman.
39+
40+
> [!NOTE]
41+
> - The Gulp team introduced a separate package, [gulp-cli](https://www.npmjs.com/package/gulp-cli), that should be installed globally. It can be used by projects that use either Gulp v3 & Gulp v4.
42+
> - Learn more about the gulp-cli here: [gulpjs/gulp/#2324](https://github.com/gulpjs/gulp/issues/2324).
43+
44+
Microsoft recommends using the most recent version of the Yeoman generator for the SharePoint Framework [@microsoft/generator-sharepoint](https://www.npmjs.com/package/@microsoft/generator-sharepoint) that supports creating on-premises projects: SPFx v1.10.0.
45+
46+
> [!IMPORTANT]
47+
> The Yeoman generator for the SharePoint Framework, starting with v1.13.0, only supports projects for SharePoint Online. Learn more about this change in the [SharePoint Framework v1.13 release notes](release-1.13.md). However, SPFx 1.4.1 is supported on Node.js v6 and Node.js v8 by default. Therefore, you need to get the latest version of the Yeoman generator for the SharePoint Framework (v1.10.0) that works on the same version of Node.js (v6 or v8) that SPFx v1.4.1 is supported on. Solution structure is created then with the v1.4.1 version packages as long as you select the environmen target properly in the Yeoman generator flow.
48+
49+
### Prepare the environment for SharePoint Framework development
50+
51+
1. Install [Node.js v8.17.0](https://nodejs.org/download/release/v8.17.0/).
52+
53+
SPFx v1.4.1 is also supported on Node.js v12 and v14 (v12.18.1 and v14.17.1 to be specific), although there is an incompatible issue [gulp 3 wasn't compatible with Node 12+](https://github.com/gulpjs/gulp/issues/2324). The workaround to resolve this issue is to specify the version of graceful-fs component as 4+. You can create npm-shrinkwrap.json in the root folder of the project and input the following content, and then run “npm install”. Also, you can use package-lock.json to resolve this issue too.
54+
55+
```powershell
56+
{
57+
58+
“dependencies”:{
59+
“graceful-fs”: {
60+
“version”: “4.2.2”
61+
}
62+
}
63+
}
64+
```
65+
66+
1. Install global dependencies
67+
68+
```console
69+
npm install [email protected] --global
70+
npm install [email protected] --global
71+
npm install @microsoft/[email protected] --global
72+
```
73+
74+
For more information, see  [SharePoint Framework development tools and libraries compatibility](tools-and-libraries.md).
75+
76+
## Build and deploy your first web part with SharePoint Framework
77+
78+
To create a new web part with SharePoint Framework, see [Build your first SharePoint client-side web part](web-parts/get-started/build-a-hello-world-web-part.md).
79+
80+
To deploy your web part to SharePoint on-premises, unlike deploying to SharePoint Online, some dependent service applications and specific configurations on the SharePoint Server are required. You can contact SharePoint Server administrator if you do not have appropriate permission to check or configure.
81+
82+
1. Ensure App Management Service and other dependent service applications are configured, see [Configure an environment for apps for SharePoint Server](/sharepoint/administration/configure-an-environment-for-apps-for-sharepoint).
83+
1. Create and configure App Catalog site, see [Manage the App Catalog in SharePoint Server](/sharepoint/administration/manage-the-app-catalog).
84+
1. Package and upload your web part, install it on your site, and add it to modern page, see [Deploy your client-side web part to a SharePoint page](web-parts/get-started/serve-your-web-part-in-a-sharepoint-page.md).
85+
86+
## Determine which version was used for a solution
87+
88+
If you have existing SharePoint Framework solutions and you'd like to confirm which version of the SharePoint Framework was used for them, you'll need to check the following locations:
89+
90+
- **.yo-rc.json**: File in the solution's root folder that stores the SharePoint Framework Yeoman template version used when the solution was created.
91+
- **package.json**: File in the solution's root folder that contains references to package versions used in the solution.
92+
- **npm-shrinkwrap.json**: File in the solution's root folder that contains information about the exact versions used (if you used the `npm shrinkwrap` command to lock down the exact versions of the solution).
93+
- **package.json**: File in the **node_modules/@microsoft/sp-webpart-base** folder that contains a `version` attribute matching the used SharePoint Framework version, if you have installed packages to your solution.
94+
95+
## Troubleshooting
96+
97+
### Impact of Node.js v6, Node.js v8, HTTP1, & HTTP2
98+
99+
Around this the time of the v1.1 release, Node.js was transitioning from Node.js v6.x to v8.x. In this update, Node.js introduced a change where the default HTTP protocol switched from HTTP1 to HTTP2. SPFx v1.1 was written for HTTP1, not HTTP2, so this change affected the local web server for SPFx v1.1 projects.
100+
101+
In Node.js v8.x, you can force HTTP1 by setting the following environment variable to instruct Node.js to use HTTP1 instead of the default HTTP2: `NODE_NO_HTTP2=1`. This environment variable only exists in Node.js v8.x. That's why if you're building SPFx solutions for SharePoint Server 2016, you should use Node.js v8.x.
102+
103+
This issue doesn't impact later versions of SPFx because they've been updated to support HTTPs.
104+
105+
For more information, see [issue #1002](https://github.com/SharePoint/sp-dev-docs/issues/1002).
106+
107+
## See also
108+
109+
- [SharePoint Framework Overview](sharepoint-framework-overview.md).
110+
- [SharePoint Server 2019 development platform](../general-development/sharepoint-2019-development-platform.md).
111+
- [Definitive guide for developers: SharePoint Framework for SharePoint Server 2019](https://www.voitanos.io/blog/definitive-guide-sharepoint-framework-sharepoint-server-2019/).
112+
- [Definitive guide for developers: SharePoint Framework for SharePoint Server SE](https://www.voitanos.io/blog/definitive-guide-sharepoint-framework-sharepoint-server-subscription-edition/).

docs/spfx/sharepoint-2019-support.md

Lines changed: 0 additions & 81 deletions
This file was deleted.

docs/spfx/supported-extensibility-platforms-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Learn more about using SPFx on SharePoint Online: [SPFx support for SharePoint O
2424

2525
SharePoint Server 2019 includes support for the SPFx up to version v1.4.1.
2626

27-
Learn more about using SPFx on SharePoint Server 2019: [SPFx support for SharePoint Server 2019](sharepoint-2019-support.md).
27+
Learn more about using SPFx on SharePoint Server 2019 and Subscription Edition: [SharePoint Framework development with SharePoint Server 2019 and Subscription Edition](sharepoint-2019-and-subscription-edition-support.md).
2828

2929
## SharePoint Server 2016
3030

docs/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@
455455
- name: Microsoft Viva Connections
456456
href: /sharepoint/dev/spfx/viva/overview-viva-connections
457457
- name: SharePoint 2019 & SE support
458-
href: spfx/sharepoint-2019-support.md
458+
href: spfx/sharepoint-2019-and-subscription-edition-support.md
459459
- name: SharePoint 2016 support
460460
href: spfx/sharepoint-2016-support.md
461461
- name: Release notes & roadmap

0 commit comments

Comments
 (0)