|
1 | 1 | ---
|
2 | 2 | title: Set up your SharePoint Framework development environment
|
3 | 3 | description: Use Visual Studio or your own custom development environment to build SharePoint Framework solutions. You can use a Mac, PC, or Linux.
|
4 |
| -ms.date: 08/20/2018 |
| 4 | +ms.date: 11/01/2019 |
5 | 5 | ms.prod: sharepoint
|
6 | 6 | localization_priority: Priority
|
7 | 7 | ms.custom: scenarios:getting-started
|
8 | 8 | ---
|
9 |
| - |
10 |
| - |
11 | 9 | # Set up your SharePoint Framework development environment
|
12 | 10 |
|
13 | 11 | You can use Visual Studio or your own custom development environment to build SharePoint Framework solutions. You can use a Mac, PC, or Linux.
|
14 | 12 |
|
15 |
| -> [!NOTE] |
| 13 | +> [!NOTE] |
16 | 14 | > Before following the steps in this article, be sure to [Set up your Office 365 tenant](./set-up-your-developer-tenant.md).
|
17 | 15 |
|
18 | 16 | You can also follow these steps by watching this video on the SharePoint PnP YouTube Channel:
|
19 | 17 |
|
20 |
| -<br/> |
21 |
| - |
22 | 18 | > [!Video https://www.youtube.com/embed/B7vLIrm2XKY]
|
23 | 19 |
|
24 |
| -<br/> |
25 |
| - |
26 | 20 | ## Install developer tools
|
27 | 21 |
|
28 | 22 | ### Install NodeJS
|
29 | 23 |
|
30 |
| -Install [NodeJS LTS version 10](https://nodejs.org). |
| 24 | +Install [NodeJS LTS version 10](https://nodejs.org). |
31 | 25 |
|
32 | 26 | - If you are in Windows, you can use the msi installers in this link for the easiest way to set up NodeJS.
|
33 |
| -- If you have NodeJS already installed, check that you have the latest version by using `node -v`. It should return the current [LTS version](https://nodejs.org). |
34 |
| -- If you are using a Mac, we recommend that you use [homebrew](http://brew.sh/) to install and manage NodeJS. |
| 27 | +- If you have NodeJS already installed, check that you have the latest version by using `node -v`. It should return the current [LTS version](https://nodejs.org). |
| 28 | + |
| 29 | +> [!IMPORTANT] |
| 30 | +> The current supported LTS version of NodeJS for the SharePoint Framework is both **Node.js v8.x** and **Node.js v10.x**. Notice that 9.x or 11.x versions are currently not supported with SharePoint Framework development. |
35 | 31 |
|
36 | 32 | > [!NOTE]
|
37 |
| -> The current supported LTS version of NodeJS for the SharePoint Framework is both 8.x and 10.x. Notice that 9.x or 11.x versions are currently not supported with SharePoint Framework development. |
| 33 | +> If you are building SharePoint Framework components for SharePoint Server 2016, refer to additional details in the **SPFx & SharePoint Server 2016** section for additional details on which version of NodeJS you should install. |
38 | 34 |
|
39 | 35 | ### Install a code editor
|
40 | 36 |
|
@@ -87,28 +83,32 @@ gulp trust-dev-cert
|
87 | 83 |
|
88 | 84 | Following are some tools that might come in handy as well:
|
89 | 85 |
|
90 |
| -* [Fiddler](https://www.telerik.com/fiddler) |
91 |
| -* [Postman](https://www.getpostman.com/docs/postman/launching_postman/navigating_postman) |
92 |
| -* [Cmder for Windows](http://cmder.net/) |
93 |
| -* [Oh My Zsh for Mac](http://ohmyz.sh/) |
94 |
| -* [Git source control tools](https://git-scm.com/) |
| 86 | +- [Fiddler](https://www.telerik.com/fiddler) |
| 87 | +- [Postman](https://www.getpostman.com/docs/postman/launching_postman/navigating_postman) |
| 88 | +- [Cmder for Windows](http://cmder.net/) |
| 89 | +- [Oh My Zsh for Mac](http://ohmyz.sh/) |
| 90 | +- [Git source control tools](https://git-scm.com/) |
95 | 91 |
|
96 |
| -## Next steps |
| 92 | +## SPFx & SharePoint Server 2016 |
97 | 93 |
|
98 |
| -You are now ready to [build your first client-side web part](web-parts/get-started/build-a-hello-world-web-part.md)! |
| 94 | +SharePoint Server 2016 uses the SharePoint Framework (SPFx) v1.1. Around this the time of the v1.1 release, NodeJS was transitioning from NodeJS v6.x to v8.x. In this update, NodeJS 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 impacted the local web server for SPFx v1.1 projects. |
99 | 95 |
|
100 |
| -## Troubleshooting |
| 96 | +In NodeJS v8.x, you can force HTTP1 by setting the following environment variable to instruct NodeJS to use HTTP1 instead of the default HTTP2: `NODE_NO_HTTP2=1`. This environment variable only exists in NodeJS v8.x. Therefore, if you are building SPFx solutions for SharePoint Server 2016, you should use NodeJS v8.x. |
101 | 97 |
|
102 |
| -### SPFx Development for SharePoint Server 2016 |
| 98 | +This issue does not impact later versions of SPFx because they have been updated to support HTTPs. |
103 | 99 |
|
104 |
| -SharePoint Server 2016 uses the SharePoint Framework (SPFx) v1.1. Around this the time of the v1.1 release, NodeJS was transitioning from NodeJS v6.x to v8.x. In this update, NodeJS introduced a change where the default changed from HTTP1 to HTTP2. For some, this caused issues with SPFx. A later version of SPFx resolved these issues, but those who are still working with SPFx v1.1 (such as those working with SharePoint Server 2016) may run into issues. |
| 100 | +For more information, refer to [issue #1002](https://github.com/SharePoint/sp-dev-docs/issues/1002). |
105 | 101 |
|
106 |
| -To resolve this, set the following environment variable to instruct NodeJS to use HTTP1 instead of the default HTTP2: `NODE_NO_HTTP2=1`. |
| 102 | +## Next steps |
107 | 103 |
|
108 |
| -For more information, refer to [issue #1002](https://github.com/SharePoint/sp-dev-docs/issues/1002). |
| 104 | +You are now ready to [build your first client-side web part](web-parts/get-started/build-a-hello-world-web-part.md)! |
| 105 | + |
| 106 | +## Troubleshooting |
109 | 107 |
|
110 | 108 | ### Unable to Trust the Self-signed Development Certificate
|
111 | 109 |
|
| 110 | +If you are working with SharePoint Server 2016 / SPFx v1.1, first check the **SPFx & SharePoint Server 2016** section above to ensure you are running a supported version of NodeJS. |
| 111 | + |
112 | 112 | In some cases, executing the command `gulp trust-dev-cert`, does not have the desired effect of trusting the self-signed development certificate on your machine. In rare cases such as these, you may need to delete a hidden folder that's generated in your profile folder. Locate & delete the folder `<homedir>/.gcb-serve-data` and then try to trust the self-signed development certificate again.
|
113 | 113 |
|
114 | 114 | ### Unable to Install Packages with NPM - Corporate Proxies
|
|
0 commit comments